A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-February/085889.html below:

[Python-Dev] Warnings

[Python-Dev] Warnings [Python-Dev] WarningsAntoine Pitrou solipsis at pitrou.net
Thu Feb 5 18:49:57 CET 2009
Jaroslav Pachola <pachola <at> mageo.cz> writes:
> 
> What's the replacement in the library then, in case that I just want to create 
> a unique file name and I don't care about the possible issues?

Three alternatives I'm thinking of:
- tempfile.mktemp(): the doc says it has been deprecated since 2.3, but it's
still there;
- NamedTemporaryFile(delete=False): that's the officially suggested replacement
in the doc;
- tempfile.mkdtemp() and then create a regular file in the created directory.

Regards

Antoine.


More information about the Python-Dev mailing list

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