Saturday, August 1, 2009

Python: get current working directory

The os library of Python is simply awesome. If you need to get the current working directory of your script. Just used the getcwd() function from os package. Its like below.

print os.getcwd()

It will output your path something like below
E:\Documents and Settings\alesandro\Desktop\Work\temp

No comments:

Get function name programaticaly - Python

This little piece of code will help you to get the function name programatically. This is very helpful when you are implementing the debug...