import os
import pdb
os.system("ToBuildOrNot.py MSS_sims")
for output in os.system:
if ToBuildOrNot is True:
print "The MSS_sims Needs To rebuilt"
elif ToBuildOrNot is False:
print "The MSS_sism does NOT Need to be Rebuilt"
else:
print "error"
Tell me more
×
Stack Overflow is a question and answer site for
professional and enthusiast programmers. It's 100% free, no registration required.
|
Don't invoke a Python script from a Python script by using system, which spawns a whole other interpreter. Just import it. Like this:
Since ToBuildOrNot.py is a script now, make sure the "main" function is protected so it doesn't execute automatically on import. Most people do it this way in Python: What does <if __name__=="__main__":> do? |
|||||||
|