Executing Python program on web
<p>Can I use os.system() or subprocess.call() to execute a python program on a webserver?</p>

<p>I mean can I write these functions in a .py script and run it from a web browser and expect the program to be executed?</p>

<p>Thanks a lot.</p>

<p>EDIT:
Sorry for all the confusion, I am giving you more background to my problem.</p>

<p>I am trying to do is this. 
I have a Python program that accepts an XML file and returns me TTF file. 
I run that porgram in terminal like this: </p>

<pre><code>ttx somefile.xml 
</code></pre>

<p>After which it does all the work and generates a ttf file. 
Now when I deploy this script as a module on web server. I use a  to allow user to browse and select the XML file. 
Then I read the file data to temporory file and then pass the file to the module script to be executed like this: </p>

<pre><code>ttx.main([temp_filename]) 
</code></pre>

<p>Is this right way to do it? BEcause at this point, I dont get any error in th elog or in browser. I get blank screen.</p>

<p>when this didnt work, I was going to try os.system or subprocess.call</p>
