chdir()
Carsten Haese
carsten at uniqsys.com
Tue May 8 16:06:56 EDT 2007
On Tue, 2007-05-08 at 12:54 -0700, HMS Surprise wrote:
> Tried executing os.chdir("c:\twill") from a python Tk shell and got
> the error message:
>
> WindowsError: [Error 123] The filename, directory name, or volume
> label syntax is incorrect: 'c:\twill'.
Backslash-t is a tab character, so you're trying to chdir to
C:<tab>will, which is not a valid path name. Use a forward slash, double
up the backslash, or use a raw string literal:
os.chdir("c:/twill")
os.chdir("c:\\twill")
os.chdir(r"c:\twill")
HTH,
--
Carsten Haese
http://informixdb.sourceforge.net
More information about the Python-list
mailing list