def unjellyFromSource(stringOrFile):
 ns = {'Instance': Instance, 'InstanceMethod': InstanceMethod, 'Class': Class, 'Function': Function, 'Module': Module, 'Ref': Ref, 'Deref': Deref, 'Copyreg': Copyreg}
 if hasattr(stringOrFile, 'read'):
  source = stringOrFile.read()
 else:
  source = stringOrFile
 code = compile(source, '<source>', 'exec')
 eval(code, ns, ns)
 if ('app' in ns):
  return unjellyFromAOT(ns['app'])
 else:
  raise ValueError(("%s needs to define an 'app', it didn't!" % stringOrFile))

def unjellyFromSource ( stringOrFile ) : ns = { 'Instance' : Instance , 'InstanceMethod' : InstanceMethod , 'Class' : Class , 'Function' : Function , 'Module' : Module , 'Ref' : Ref , 'Deref' : Deref , 'Copyreg' : Copyreg } if hasattr ( stringOrFile , 'read' ) : source = stringOrFile . read ( ) else : source = stringOrFile code = compile ( source , '<source>' , 'exec' ) eval ( code , ns , ns ) if ( 'app' in ns ) : return unjellyFromAOT ( ns [ 'app' ] ) else : raise ValueError ( ( "%s needs to define an 'app', it didn't!" % stringOrFile ) )
pass me a string of code or a filename that defines an app variable .