Wenzel Jakob | 5708221 | 2015-09-04 23:42:12 +0200 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | from __future__ import print_function |
Wenzel Jakob | 38bd711 | 2015-07-05 20:05:44 +0200 | [diff] [blame] | 3 | import sys |
| 4 | sys.path.append('.') |
| 5 | |
| 6 | import example |
| 7 | |
| 8 | print(example.__name__) |
| 9 | print(example.submodule.__name__) |
| 10 | |
| 11 | from example.submodule import * |
Wenzel Jakob | db028d6 | 2015-10-13 23:44:25 +0200 | [diff] [blame] | 12 | from example import OD |
Wenzel Jakob | 38bd711 | 2015-07-05 20:05:44 +0200 | [diff] [blame] | 13 | |
| 14 | submodule_func() |
| 15 | |
| 16 | b = B() |
| 17 | print(b.get_a1()) |
| 18 | print(b.a1) |
| 19 | print(b.get_a2()) |
| 20 | print(b.a2) |
| 21 | |
| 22 | b.a1 = A(42) |
| 23 | b.a2 = A(43) |
| 24 | |
| 25 | print(b.get_a1()) |
| 26 | print(b.a1) |
| 27 | print(b.get_a2()) |
| 28 | print(b.a2) |
| 29 | |
Wenzel Jakob | db028d6 | 2015-10-13 23:44:25 +0200 | [diff] [blame] | 30 | print(OD([(1, 'a'), (2, 'b')])) |