"Inserting" a line in a text file?

Mark Hadfield m.hadfield at niwa.co.nz
Tue May 7 18:31:52 EDT 2002


"Duncan Smith" <buzzard at urubu.freeserve.co.uk> wrote in message
news:ab9jch$hv1$1 at newsg4.svr.pol.co.uk...

> It just occured to me that I need to ensure that any temporary file
> has a unique path + filename.  Is there some common idiom for this,
> or is os.tempnam([dir[,prefix]]) or os.tmpnam() appropriate?
> Cheers.

http://www.python.org/doc/current/lib/module-tempfile.html

--
Mark Hadfield            "Ka puwaha et tai nei, Hoea tatou"
m.hadfield at niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)






More information about the Python-list mailing list