Ok...I dont know where module x is, but I know that I need to get the path to the directory two levels up.
x
So, is there a more elegant way to do:
You can use this as a generic solution:
import os def getParentDir(path, level=1): return os.path.normpath( os.path.join(path, *([".."] * level)) )