chdir()

HMS Surprise john at datavoiceint.com
Tue May 8 16:11:20 EDT 2007


On May 8, 3:06 pm, Carsten Haese <cars... at uniqsys.com> wrote:
> 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 Haesehttp://informixdb.sourceforge.net

Thanks all. Windows bytes me again. I know better just wasn't
thinking. \n




More information about the Python-list mailing list