Rémy Léone added the comment:
I've tackle the 1. by replacing write/open with os.write/os.open. I still get :
$ python3 simple_incorrect.py
b'\xc3\xa9'
Traceback (most recent call last):
File "simple_incorrect.py", line 32, in
os.write(tun, incorrect_frame)
OS
Rémy Léone added the comment:
The question I'm the most interested about is why depending on what the bytes
object contains I get a different result. In one case the bytes are written
fine to the TUN interface file descriptor and in the other case I get an
Errno22. My assumption is tha
Rémy Léone added the comment:
Traceback (most recent call last):
File "simple_incorrect.py", line 31, in
tun.write(incorrect_frame)
OSError: [Errno 22] Invalid argument
--
___
Python tracker
<http://bugs.python.o
New submission from Rémy Léone:
I cannot write certain bytes object to a tun interface file. I've added a
working and unworking example in the attached file.
I'm running on Ubuntu16.04 with Python 3.5.2
--
components: IO
files: simple_incorrect.py
messages: 294143
nosy: