[Cython] minor bug -- cimport inside function
David Harvey
dmharvey at math.harvard.edu
Mon Feb 25 05:11:03 CET 2008
If I run cython on the following file:
=======================
def foo():
from vial cimport poison
=======================
I get the following traceback:
Traceback (most recent call last):
File "/Users/david/sage-2.10.2/local/bin/cython", line 8, in <module>
main(command_line = 1)
File "/Users/david/sage-2.10.2/local/lib/python2.5/site-packages/
Cython/Compiler/Main.py", line 322, in main
result = context.compile(source, options)
File "/Users/david/sage-2.10.2/local/lib/python2.5/site-packages/
Cython/Compiler/Main.py", line 198, in compile
tree.process_implementation(scope, options, result)
File "/Users/david/sage-2.10.2/local/lib/python2.5/site-packages/
Cython/Compiler/ModuleNode.py", line 49, in process_implementation
self.generate_c_code(env, result)
File "/Users/david/sage-2.10.2/local/lib/python2.5/site-packages/
Cython/Compiler/ModuleNode.py", line 219, in generate_c_code
self.body.generate_function_definitions(env, code)
File "/Users/david/sage-2.10.2/local/lib/python2.5/site-packages/
Cython/Compiler/Nodes.py", line 674, in generate_function_definitions
self.body.analyse_declarations(lenv)
File "/Users/david/sage-2.10.2/local/lib/python2.5/site-packages/
Cython/Compiler/Nodes.py", line 3331, in analyse_declarations
module_scope = env.find_module(self.module_name, self.pos)
AttributeError: LocalScope instance has no attribute 'find_module'
david
More information about the Cython-dev
mailing list