%SystemDrive%
rtilley
rtilley at vt.edu
Wed Feb 15 16:22:45 EST 2006
Atanas Banov wrote:
> using
> os.chdir('/')
> os.getcwd()
> is plain wrong in Windows.
>
> what it does is change the current directory to root of the CURRENT
> DRIVE (i.e. the drive of the directory where script was started from),
> not the system drive. for example, if current directory was
> c:\myscripts and system drive is d:, this will return c:\ and not d:\.
> hence chdir doesnt do any good
Thanks for the explanation. I'll use the environ feature of os... I just
didn't realize it existed :)
More information about the Python-list
mailing list