Kyle Roberts added the comment:

Thanks for the comments Antoine. I didn't have a good reason for using the file 
name at the time, although even when using the file name I should have used the 
"file" variable that was already created. I tried using the file descriptor, 
but I encountered a "[Errno 9] Bad file descriptor" once the methods using 
_mkstemp_inner call _io.open on the returned fd. This leads me to believe that 
the fd is being closed somehow, but as you can see from my copy function, I 
don't implicitly or explicitly close the file using the file descriptor. I'm 
not sure yet why the file name works as expected but the fd does not. Am I 
missing something simple?

As for points 2-4 I have most of that done. What's the pythonic way for 
determining if an argument is file-like? I've seen isinstance, hasattr, etc.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17673>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to