os independent temp dir?
ben.hutchings at roundpoint.com
Thu May 10 01:19:10 CEST 2001
"Mike C. Fletcher" <mcfletch at home.com> writes:
> How about:
> >>> import os
> >>> def getTemp():
> ... for possible in ('temp','tmp','tmpdir'):
> ... if os.environ.has_key( possible):
> ... return os.environ[ possible ]
> >>> getTemp()
> No idea if the Mac even has environmental variables, so no help there...
> It's a hack, but oh well :) .
Unix environmental variable names are case-sensitive and are
Any opinions expressed are my own and not necessarily those of Roundpoint.
More information about the Python-list