chdir questions

Patrick K Moorman khadji at pld.com
Sun Feb 6 12:52:57 EST 2000


I know this is must be an easy one but how do I use os.chdir?  I have tried
many different ways of listing the path but no matter how I type it I get an
error.  Most common is either:

>>> os.chdir(C:\temp)
  File "<string>", line 1
     os.chdir(C:\temp)
               ^
 SyntaxError: invalid syntax

>>> os.chdir(c\temp)
  File "<string>", line 1
     os.chdir(c\temp)
                     ^
 SyntaxError: invalid token

I have looked through many tut's but it seems that this is too simple to be
mentioned.  Can anyone give the syntax for this including what the path
should look like?  On a related note, is there a book that has the stanard
lib broke down like this?  Thank you.





More information about the Python-list mailing list