How to get current working directory in Python



This is my OLD blog. I've copied this post over to my NEW blog at:

http://www.saltycrane.com/blog/2007/11/how-to-get-current-working-directory-in/

You should be redirected in 2 seconds.



I always forget how to get the current working directory so here it is, mainly for my own reference.
import os 
os.getcwd() 
'C:\\Python25'

No comments:

About

This is my *OLD* blog. I've copied all of my posts and comments over to my NEW blog at:

http://www.saltycrane.com/blog/.

Please go there for my updated posts. I will leave this blog up for a short time, but eventually plan to delete it. Thanks for reading.