detecting the operating system

James Kew james.kew at btinternet.com
Sat Feb 28 18:18:30 EST 2004


"Michael" <mogmios at mlug.missouri.edu> wrote in message
news:mailman.253.1078007663.8594.python-list at python.org...
> Checking sys.platform is easy enough. I use it to figure out if I'm
> running on Linux or Windows. For Linux I take the users home directory
> to put files in. In Windows I check the registry to find out the
> location of My Documents and then save files there.

os.path.expanduser("~") ?

James






More information about the Python-list mailing list