Profile

Click to view full profile
Hi, I'm Veerapat Sriarunrungrueang, an expert in technology field, especially full stack web development and performance testing.This is my coding diary. I usually develop and keep code snippets or some tricks, and update to this diary when I have time. Nowadays, I've been giving counsel to many well-known firms in Thailand.
view more...

Monday, March 21, 2011

How to change current directory in Python shell

Basically, you can't use os.system('cd ...') directly. But you can use os.chdir('path') instead.
For example:
os.chdir('..')    # Move up
os.chdir('./')    # Current dir
os.chdir('path')  # Go to folder name 'path'
More detail at: http://docs.python.org/library/os.html

No comments:

Post a Comment