win32api... another question: GetEnvironmentVariable("PATH")

Kevin Cazabon kcazabon at
Mon Nov 15 05:43:55 CET 1999

I can't seem to get the win32api.GetEnvironmentVariable() function to work
properly... am I not using it correctly by the following?

path = win32api.GetEnvironmentVariable("PATH")


path = win32api.GetEnvironmentVariable("%%PATH%%")

BOTH of the above return None to path... what am I missing?

And lastly, is there an equivalent "SetEnvironmentVariable"?  There is no
mention in the docs, but maybe there's a way to modify the Windows PATH on
the fly, besides a os.system() command (which isn't really correct either).


kcazabon at

More information about the Python-list mailing list