First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Use the 'import' statement.
For example, if I have prog1.py that contains:
print 'test 1'
and I run prog2.py which contains:
import prog1
print 'test 2'
My output would be:
test 1
test 2
2 | No.2 Revision |
Use the 'import' statement.
For example, if I have prog1.py that contains:
print 'test 1'
and I run prog2.py which contains:
import prog1
print 'test 2'
My output would be:
test 1
test 2
Importing a module or another program will automatically execute that program upon import.