Turning off warnings

Gerhard Häring gh at ghaering.de
Mon Dec 1 16:31:06 CET 2003

Paulo Pinto wrote:
> [...] Now when I use os.tempnam() or os.tmpnam()
> I get a runtime warning about security issues. [...]
> Is there any way to turn the message off?

 >>> import os, warnings
 >>> warnings.filterwarnings("ignore", "tempnam")
 >>> os.tempnam()

-- Gerhard

More information about the Python-list mailing list