Get one python file to run another, using python 2.7.3 and Ubuntu 12.10:
Put this in main.py:
#!/usr/bin/python
import yoursubfile
Put this in yoursubfile.py
#!/usr/bin/python
print("hello")
Run it:
python main.py
It prints:
hello
Thus main.py
runs yoursubfile.py
There are 8 ways to answer this question, A more canonical answer is here: How to import other Python files?