The first commit changes the hardcoded /dev/null device to os.devnull which fixes redirection in Windows when saving the file.
The second commit is a workaround for Windows, tempfile.NamedTemporaryFile works weird on Windows, when writing the contents, those are not flushed (even with flush()) so disabling the manually deleting of file and doing it manually works correctly (and should continue to work under other OS) - I also removed the close() call as using with that's unnecessary.
Hello:
This fixes #50 .
/dev/null
device toos.devnull
which fixes redirection in Windows when saving the file.tempfile.NamedTemporaryFile
works weird on Windows, when writing the contents, those are not flushed (even withflush()
) so disabling the manually deleting of file and doing it manually works correctly (and should continue to work under other OS) - I also removed theclose()
call as usingwith
that's unnecessary.