TypeError while checking for permissions with os.access() on windows xp
apt.shansen at gmail.com
Sat Aug 22 21:30:16 CEST 2009
> Why on IDLE it works, but when i run this script in cmd.exe, the
> os.getenv('HOME') goes NoneType?
> I'm to newbie yet to understand this :/
HOME is simply not a standard environment variable that Windows provides.
Any program can set/add environment variables as it deems fit; in this case
it seems IDLE is setting one, but you can't rely on it outside of IDLE.
If you do os.environ["HOMEDRIVE"] + os.environ["HOMEPATH"] it may be what
Start up cmd.exe, type 'set' -- that's the default/standard environment
variables you have to work with. That's it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list