Nick McElwaine added the comment:
Thankyou for clearing that up!
On 18 May 2018 at 13:05, Berker Peksag wrote:
>
> Berker Peksag added the comment:
>
> Thanks for the report. I agree with Eryk. os.get_terminal_size() is a
> low-level function. shutil.get_terminal_size() sh
New submission from Nick McElwaine :
os.get_terminal_size() fails with () or (0) or (1)
shutil.sys fails calling it with (sys.__stdout__.fileno())
because sys.__stdout__ is type None
--
components: Windows
messages: 309276
nosy: Dhruve, paul.moore, steve.dower, tim.golden, zach.ware
New submission from Nick McElwaine:
import socket # Import socket module
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(hostname,port) # this works
message = 'text'
s.sendall(message) TypeError: a bytes-like object is required, not 'str'