-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimport.py
More file actions
executable file
·24 lines (18 loc) · 785 Bytes
/
import.py
File metadata and controls
executable file
·24 lines (18 loc) · 785 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
#!/usr/bin/python -B
#use the -B option to prevent the creation of .pyc files
print "Importing concurrency"
import concurrency
#import brings in everything that's not wrapped in "if __name__ == '__main__':"
print "Importing getstdout"
from getstdout import getstdout
#there's nothing in getstdout.py other than imports and function definitions
#this is how a module should be written
print "Importing complex"
import complex as modulename
#executes all non-definitional code in circle.py
#modes should avoid doing this
print "\n\n\nFinished importing. Now using those imports."
c1=modulename.complex(1,2)
mylst=[]
concurrency.thread_func(mylst, c1, "teststr") #one line function: arg1.append(str(arg2) + arg3)
print mylst #mylst was modified during the call to thread_func