Changing Working Directory in Windows
tejarex at yahoo.com
Mon Mar 11 16:10:33 CET 2002
<nrk at cmcorp.com> wrote in message
news:3c8cb05d.221547919 at news.earthlink.net...
> I'm brand new to Python. Can someone tell me how to change a
> directory in a script on a Windows system?
> What does the pathname specification look like?
> Can I use an absolute path name when referring to a file?
Look at the os and path modules (ntpath for Windows).
Note that you *can* use forward slashes in filenames for the Windows
API functions that you access thru the above two modules. This avoids
having to worry about doubling backslashes.
You may have problems with the way Windows fiddles with upper/lower
Terry J. Reedy
More information about the Python-list