Skip to content

Instantly share code, notes, and snippets.

View myxyzy's full-sized avatar
🚗
Focusing

M myxyzy

🚗
Focusing
View GitHub Profile
@lambdaman2
lambdaman2 / Snipplr-53250.py
Created October 1, 2012 12:48
Python: Ways to Move up and Down the dir structure in Python
#Moving up/down dir structure
print os.listdir('.') # current level
print os.listdir('..') # one level up
print os.listdir('../..') # two levels up
# more complex example:
# This will walk the file system beginning in the directory the script is run from. It
# deletes the empty directories at each level