-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunme.py
More file actions
29 lines (23 loc) · 680 Bytes
/
runme.py
File metadata and controls
29 lines (23 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/python
# Add the two packages to the path
import sys
sys.path.append('project1')
sys.path.append('project2')
# Import the modules from the two packages
import mypackage.module1
import mypackage.module2
import mypackage.module3
if __name__ == '__main__':
# Create some objects from the first package
p1_foo = mypackage.module1.foo.Foo()
p1_bar = mypackage.module1.bar.Bar()
p1_SomeClass = mypackage.module2.SomeClass()
# Create some objects from the second package
p2_bar = mypackage.module3.bar.Bar()
p2_baz = mypackage.module3.baz.Baz()
# Show that they all work
p1_foo.run_me()
p1_bar.run_me()
p1_SomeClass.run_me()
p2_bar.run_me()
p2_baz.run_me()