cgi subprocess, cannot get output
Hello, In the following cgi program, I cannot get subprocess output. I print the header, flush stdout to prepare it to new content, but variable 'o' is always empty. Could somebody help me with that? def main(): print "Content-type: text/html\n\n" sys.stdout.flush() if form.has_key('sentence'): input = form['sentence'].value o = Popen(['./tinki', input], stdout=PIPE).communicate()[0] result = cgi.escape(o) results['xmlfile'] = result results['sentence'] = input content['output'] = (output % results) print template % content Best regards, -- Jakub P. Nowak -- http://mail.python.org/mailman/listinfo/python-list
Re: cgi subprocess, cannot get output
Dnia 26.04.2006 James Stroud <[EMAIL PROTECTED]> napisa³/a: } Jakub Piotr Nowak wrote: }> Hello, }> }> In the following cgi program, I cannot get subprocess output. }> I print the header, flush stdout to prepare it to new content, }> but variable 'o' is always empty. }> }> Could somebody help me with that? }> }> [...mniam...] }> }> Best regards, } } What kind of script is tinki? I had a bitch of a problem like this with } perl and ended up just writing to a file. No idea why I couldn't get the } stdout. Tinki is a natural language parser. It takes a sentence as a command line argument and prints xml file to stdout. Thanks for the hint, I will try... Best regards, -- Jakub P. Nowak -- http://mail.python.org/mailman/listinfo/python-list
[ANN] RuPy 2007 - Python & Ruby Conference
RuPy 2007 Python & Ruby Conference Poznan, Poland April 7-8, 2007 RuPy is a Python & Ruby conference. It will be held at Adam Mickiewicz University, in Poznan, Poland, so it is relatively accessible from both the East and the West of Europe. The philosophy of RuPy is to put together Python & Ruby experts with young programmers and to provide a good communication channel for East-West exchange of prospective ideas. -- Call For Participation -- We would like to invite you to join us for two days of Python & Ruby fun. We are looking for speakers willing to share their knowledge and experience, talk about new solutions and show new developments. Potential presenters should submit an abstract to: rupy-talks at wmid.amu.edu dot pl by November, 31th 2006 for consideration. If you have any special presentation needs, let us know. For more details check our site: http://rupy.wmid.amu.edu.pl Best regards, -- Jakub P. Nowak -- http://mail.python.org/mailman/listinfo/python-list