Friday, March 17, 2017

python one-liner to find the upper directory for a path

import os
 
updir = os.path.dirname(currentdir.rstrip(os.sep))

No comments:

Post a Comment