evan at 4-am.com
Sun Feb 6 19:13:50 CET 2000
Patrick K Moorman <khadji at pld.com> wrote in message
news:Bmin4.4589$NS3.14557 at newsfeed.slurp.net...
> I know this is must be an easy one but how do I use os.chdir? I have
> many different ways of listing the path but no matter how I type it I get
> error. Most common is either:
> >>> os.chdir(C:\temp)
> File "<string>", line 1
Is your previous experience coding with shell scripts or a language like
Rebol? You will need to adjust some of your basic concepts for Python.
In Python you need to put quotes around text which is not a keyword or a
name for a Python object. Also, backslashes ('\') are used to "escape" the
next character, so '\t' is a tab character. Fortunately, Python file
functions accept forward-slashed filenames on all platforms.
For the above you would write either:
Evan @ digicool
More information about the Python-list