Magenta Asset Map v0.3
-
-
Save mottosso/218e7344efb95175f4c4 to your computer and use it in GitHub Desktop.
Asset Map 0.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
def hierarchy_to_dict(path): | |
d = dict((n, hierarchy_to_dict(os.path.join(path, n))) | |
for n in os.listdir(path) | |
if os.path.isdir(os.path.join(path, n))) | |
return d | |
print json.dumps(hierarchy_to_dict( | |
r'C:\Users\marcus\Dropbox\projects\MagentaHierarchy0.3'), indent=2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment