does open() still take file descriptors in py3 - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: does open() still take file descriptors in py3 (/thread-1757.html) |
does open() still take file descriptors in py3 - Skaperen - Jan-24-2017 i am trying to open a file descriptor (an end of a pipe from os.pipe()) using open(). i get a funny error message and execution continues. any idea what is happening? yes, rfdw is an int. it is supposed to work. it did work. execution continued after the exception and the expected listing came out just fine and correct. using python 3.5.2.
RE: does open() still take file descriptors in py3 - Larz60+ - Jan-24-2017 Not much help we can give you without seeing code. Here's a stack overflow post on the error: http://stackoverflow.com/questions/27274705/typeerror-coercing-to-unicode-need-string-or-buffer-int-found You probably already know that. Didn't look at your user name before posting answer RE: does open() still take file descriptors in py3 - Skaperen - Jan-25-2017 it's big code. i can try to minimize it and post the minimized. i am just wonder if there is something going on with open(), especially with open() using fd's. or if maybe i should switch to os.fdopen() which only accepts an int. i am just try to get an understanding of what the error message means, not debug the code (yet). that and understand why it continued to run. i thought out why it probably continued to run. the error was in the parent process and the children continued on. |