STINNER Victor added the comment:

curses_temporaryfile.patch: Call tempfile.TemporaryFile in getwin() and 
putwin() to create the temporary file in a more portable and safer manner.

The curses library requires a FILE* object, but TemporaryFile.close() must be 
called to remove the temporary file. So I chose to duplicate the file 
descriptor, so we can close fclose() and tmpfile.close().

I chose to modify the C rather rather than trying to implement a window class 
in Python, because the C window class is part of a "PyCurses_API", and many C 
functions instanciate the C class.

----------
Added file: http://bugs.python.org/file46622/curses_temporaryfile.patch

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

Reply via email to