detecting the operating system

James Kew james.kew at btinternet.com
Mon Mar 1 15:16:16 EST 2004


"Josiah Carlson" <jcarlson at nospam.uci.edu> wrote in message
news:c1thq4$129$1 at news.service.uci.edu...
> > os.path.expanduser("~") ?
>
> Doesn't work for all platforms.  Occasionally in windows that will
> expand to %USERPROFILE%, which you then have to resolve with os.getenv.

I'm also told (in email) it doesn't work under Win98.

Which is a shame, 'cause it's quite handy...

James





More information about the Python-list mailing list