def pathstrip(path, n):
 pathlist = [path]
 while (os.path.dirname(pathlist[0]) != ''):
  pathlist[0:1] = os.path.split(pathlist[0])
 return '/'.join(pathlist[n:])

def pathstrip ( path , n ) : pathlist = [ path ] while ( os . path . dirname ( pathlist [ 0 ] ) != '' ) : pathlist [ 0 : 1 ] = os . path . split ( pathlist [ 0 ] ) return '/' . join ( pathlist [ n : ] )
strip n leading components from the given path .