Esempio n. 1
0
 def paths(src):
     script = Script(src)
     expr_stmt = script._get_module_node().children[0].children[0]
     return set(sys_path._paths_from_assignment(script._get_module(), expr_stmt))
Esempio n. 2
0
 def paths(src):
     script = Script(src)
     expr_stmt = script._get_module_node().children[0].children[0]
     return set(
         sys_path._paths_from_assignment(script._get_module(), expr_stmt))
Esempio n. 3
0
 def paths(src):
     script = Script(src, path='/foo/bar.py')
     expr_stmt = script._module_node.children[0]
     return set(
         sys_path._paths_from_assignment(script._get_module(), expr_stmt))
Esempio n. 4
0
 def paths(src):
     script = Script(src)
     stmt = script._get_module_node().statements[0]
     return set(sys_path._paths_from_assignment(script._get_module(), stmt))
Esempio n. 5
0
 def paths(src):
     grammar = load_grammar()
     stmt = ParserWithRecovery(grammar, unicode(src)).module.statements[0]
     return set(sys_path._paths_from_assignment(Evaluator(grammar), stmt))
Esempio n. 6
0
 def paths(src):
     script = Script(src, path='/foo/bar.py')
     expr_stmt = script._module_node.children[0]
     return set(sys_path._paths_from_assignment(script._get_module(), expr_stmt))
Esempio n. 7
0
 def paths(src):
     grammar = load_grammar()
     stmt = ParserWithRecovery(grammar, unicode(src)).module.statements[0]
     return set(sys_path._paths_from_assignment(Evaluator(grammar), stmt))