changing directories from within the shell

Andrew Wilkinson ajw140NO at SPAMyork.ac.uk
Mon May 3 09:36:46 EDT 2004


Darren Dale wrote:

> I am sure this has been covered in the documentation, but I havent found
> it. Could anyone tell me how to change directories from within the
> python shell?
> 
> Thanks

import os
os.chdir("newpath")

http://www.python.org/doc/current/lib/os-file-dir.html

HTH,
Andrew



More information about the Python-list mailing list