Zvezdan Petkovic wrote: > Of course, the above are C functions. I don't think that Python > programming is immune from such security considerations either. The tempfile module exposes the same functionality (and uses mkstemp() to create its filenames). It has also had features added over the years to prevent automatic deletion of the temporary files, precisely so you *can* grab them and rename them afterwards. It actually wouldn't be a bad place to put a "create a temporary file and rename it to <name> when closing it" helper class. Such a utility could also include a way to request "fsync() before rename" behaviour (off by default of course). Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia ---------------------------------------------------------------
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4