Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # test.pyx
- class Foo:
- def __init__(self, x, y):
- self.x = x
- self.y = y
- # test2.py
- import pyximport
- pyximport.install()
- import test
- foo = test.Foo(1, 2)
- print foo.x, foo.y
- # % python2.7 test2.py
- # Traceback (most recent call last):
- # File "test2.py", line 4, in <module>
- # foo = test.Foo(1, 2)
- # AttributeError: 'module' object has no attribute 'Foo'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement