os.tempnam() warning

Rajarshi Guha rajarshi at presidency.com
Tue Sep 10 09:56:53 EDT 2002


Hi,
  whenever I use the function os.tempnam() I get

/usr/local/adapt/bin/striphin.py:14: RuntimeWarning: tempnam is a potential security risk to your program
  outfilename =  os.tempnam()

The C library advises against using tempnam() and suggests using
mkstemp(). Is there any Python equivilant?

(I use Python 2.2)

Thanks,
Rajarshi Guha



More information about the Python-list mailing list