Created
September 25, 2014 12:50
-
-
Save betatim/fcbaa6dcb6cfb23be204 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def nodes(evt, node=None): | |
nodenames = [] | |
if node is None: | |
root = evt.retrieveObject('') | |
node = root.registry() | |
if node.object(): | |
nodenames.append(node.identifier()) | |
for l in evt.leaves(node): | |
# skip a location that takes forever to load | |
# XXX How to detect these automatically?? | |
if "Swum" in l.identifier(): | |
continue | |
temp = evt[l.identifier()] | |
nodenames += nodes(evt, l) | |
else: | |
nodenames.append(node.identifier()) | |
return nodenames |
This file contains hidden or 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
# Get a small print out of what is there in the event | |
evt.dump() | |
# print out "all" TES locations | |
# prints out packed locations, so you need to know | |
# what the unpacked location is called to actually access it | |
print "-"*80 | |
for node in nodes(evt): | |
print node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment