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 * | ||||
12 | |||||
13 | submodule_func() | ||||
14 | |||||
15 | b = B() | ||||
16 | print(b.get_a1()) | ||||
17 | print(b.a1) | ||||
18 | print(b.get_a2()) | ||||
19 | print(b.a2) | ||||
20 | |||||
21 | b.a1 = A(42) | ||||
22 | b.a2 = A(43) | ||||
23 | |||||
24 | print(b.get_a1()) | ||||
25 | print(b.a1) | ||||
26 | print(b.get_a2()) | ||||
27 | print(b.a2) | ||||
28 |