Esempio n. 1
0
 def compile_scan_imports(self, src, filename='<string>'):
     co = self.compile(src, filename)
     context = {}
     processor = bc.ImportProcessor()
     self.assertNotNone(processor)
     bc.scan_code(co, processor, context)
     return context['imports']
Esempio n. 2
0
 def update_code(self, co):
     self.context.clear()
     processor = load_bytecode_processors()
     bc.scan_code(co, processor, self.context)