i know we can make us own function for do this with several os.path functions. but if there is a any existing function for do this, i want to use it
my solution is
get_parent_dir("/path/to/myapp/modules") # returns => '/path/to/myapp/'
my solution is
parentdir = lambda path: os.path.realpath(path + "/.." )