registry_explorer.py
Go to the documentation of this file.
1 
2 import argparse
3 import code
4 
5 from models.Organizational import PlotRegistry
6 
7 
8 
9 # bootstrap, load config, go!
10 if __name__ == "__main__":
11  parser = argparse.ArgumentParser(description='Open a PlotRegistry.')
12  parser.add_argument('registry', metavar='registry',
13  help='Registry you want to open (.pkl)')
14 
15  args = parser.parse_args()
16 
17  registry = PlotRegistry.Deserialize(args.registry)
18 
19  print "Registry loaded from file:", args.registry
20  print " has been assigned to var 'registry' in your local namespace"
21  print
22  v = globals().copy()
23  v["registry"] = registry
24  shell = code.InteractiveConsole(v)
25  shell.interact()