calling another python file within python
neurogasm at gmail.com
Tue Mar 14 17:09:49 CET 2006
i have a python file called pyq which outputs stock quotes, currently i
also have a html file that takes stock ticker inputs, i would like to
bridge the two by building another program that takes the html inputs
and uses them to call the pyq stock ticker program and then output them
into a text file...
any idea how to do this? my tentative code is:
os.system("python pyq.py ibm > text1.txt")
note: currently the text1.txt outputted is just blank, however if i run
the command normally as 'python pyq.py ibm' in the command line, it
works correctly and gives me the price of ibm.
More information about the Python-list