pybind11/example/example-modules.py

31 lines
431 B
Python
Raw Normal View History

#!/usr/bin/env python
from __future__ import print_function
2015-07-05 18:05:44 +00:00
import sys
sys.path.append('.')
import example
print(example.__name__)
print(example.submodule.__name__)
from example.submodule import *
2015-10-13 21:44:25 +00:00
from example import OD
2015-07-05 18:05:44 +00:00
submodule_func()
b = B()
print(b.get_a1())
print(b.a1)
print(b.get_a2())
print(b.a2)
b.a1 = A(42)
b.a2 = A(43)
print(b.get_a1())
print(b.a1)
print(b.get_a2())
print(b.a2)
2015-10-13 21:44:25 +00:00
print(OD([(1, 'a'), (2, 'b')]))