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:
Personally, I find that using the os module is the easiest method as outlined below. If you are only going up one level, replace ('../..') with ('..').
import os os.chdir('../..') --Check: os.getcwd()