How to get inputs for a python program that run from another python program
pradeep nair
deepns7 at gmail.com
Mon Jun 11 06:47:07 EDT 2007
I would like to know how to pass keyboard input for a python script
which is ran by another script.
for eg:
hello1.py:
import os
if __name__=='__main__':
print "I will call this other program called hello.py"
os.system("python hello.py")
print "hello1.py"
hello.py:
import os
if __name__=='__main__':
print "press ENTER to display"
#code wer if the user hits enter
print "hello"
#else the user hits any other keyboard button:
sys.exit()
now wen i run hello1.py,i want the some function or utility in
hello1.py that can pass the keyboard i/p to hello.py .
More information about the Python-list
mailing list