Issue with using subprocess.Popen inside a view
Hi All,
I am facing a problem with using subprocess.Popen inside my views. The
program that I am trying to run using Popen, tries to talk to a device
on the network providing input to various prompts coughed up by the
device. Unfortunately, a response is being gobbled up somewhere
causing the program to hang. The execution stalls until the prompt is
answered (which never happens).
The strange thing is, if I were to invoke the same Popen call from
inside a regular python module, it runs without any hitch. The problem
is seen only if the program is called from inside a Django view. I've
tried various things like substituting Popen with os.System etc., but
have had no luck so far.
I've posted this question at stackoverflow as well (http://
stackoverflow.com/questions/3422775/subprocess-popen-hangs-with-
interactive-programs-when-called-from-inside-django). Go to that post
for snippets of the problematic code. Thanks for any help.
-Z
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home