detecting the operating system

eltronic at juno.com eltronic at juno.com
Tue Mar 2 00:54:52 EST 2004


On Mon, 1 Mar 2004 20:16:16 -0000 "James Kew" <james.kew at btinternet.com>
writes:
> "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.
> 
win98, in autoexec.bat & reboot. or use msconfig
set HOME=c:/Temp/orwhatever

print os.path.expanduser("~")
c:/Temp/orwhatever

e

________________________________________________________________
The best thing to hit the Internet in years - Juno SpeedBand!
Surf the Web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!




More information about the Python-list mailing list