Hi,

    While fixing several windows specific unit test failures, I
encountered some problems I am not sure how to solve. In particular, we
have a relatively common idiom as follows:

Open file securely with a visible name (using NamedTemporaryFile)
write some content into it
open the file with another open call

Of course, this does not work on windows. NamedTemporaryFile is
basically useless on this platform (windows refuses to let a process to
reopen a file opened from NamedTemporaryFile). I can see two solutions:
 - using mkstemp + re-opening the file later from the name returned by
mkstemp: AFAICT, this basically defeats the whole purpose of mkstemp
 - have our own layer to bypass mkstemp on windows, where security is
not a concern anyway, and use the proper functions on sane platforms.

Do people have an opinion on this ? Or maybe a solution to the problem
altogether ?

cheers,

David
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to