View Single Post
Old 01-30-2011, 06:56 AM   PM User | #1
Apothem
Regular Coder

 
Apothem's Avatar
 
Join Date: Mar 2008
Posts: 380
Thanks: 36
Thanked 25 Times in 25 Posts
Apothem is an unknown quantity at this point
How do you "include" a file?

How do you basically include (or import) a file?
Such that if I had:

a.py:
Code:
print 'hello'
b.py:
Code:
print 'bye'
c.py:
Code:
<import a.py>
print "---"
<import b.py>

How do I make it so that if I run c.py, it will print out:
Code:
hello
---
bye

Last edited by Apothem; 01-30-2011 at 09:09 AM..
Apothem is offline   Reply With Quote