Re: subprocess call is not waiting.

2013-09-19 Thread harish.barve...@gmail.com
subprocess.call(tempFileName, shell=True).communicate() this process is not blocking. I want to make a blocking call to it. please help -- https://mail.python.org/mailman/listinfo/python-list

Re: subprocess call is not waiting.

2013-09-19 Thread Terry Reedy
On 9/19/2013 7:42 AM, harish.barve...@gmail.com wrote: subprocess.call(tempFileName, shell=True).communicate() should raise an AttributeError as the int returned by subprocess.call does not have a .communicate method. this process is not blocking. Why do you think that? All function

Re: subprocess call is not waiting.

2012-09-19 Thread andrea crotti
2012/9/18 Dennis Lee Bieber wlfr...@ix.netcom.com: Unless you have a really massive result set from that ls, that command probably ran so fast that it is blocked waiting for someone to read the PIPE. I tried also with ls -lR / and that definitively takes a while to run, when I do

Re: subprocess call is not waiting.

2012-09-19 Thread Hans Mulder
On 19/09/12 12:26:30, andrea crotti wrote: 2012/9/18 Dennis Lee Bieber wlfr...@ix.netcom.com: Unless you have a really massive result set from that ls, that command probably ran so fast that it is blocked waiting for someone to read the PIPE. I tried also with ls -lR / and that

Re: subprocess call is not waiting.

2012-09-19 Thread Gene Heskett
On Wednesday 19 September 2012 11:56:44 Hans Mulder did opine: On 19/09/12 12:26:30, andrea crotti wrote: 2012/9/18 Dennis Lee Bieber wlfr...@ix.netcom.com: Unless you have a really massive result set from that ls, that command probably ran so fast that it is blocked

Re: subprocess call is not waiting.

2012-09-19 Thread andrea crotti
2012/9/19 Hans Mulder han...@xs4all.nl: Yes: using top is an observation problem. Top, as the name suggests, shows only the most active processes. Sure but ls -lR / is a very active process if you try to run it.. Anyway as written below I don't need this anymore. It's quite possible that

Re: subprocess call is not waiting.

2012-09-19 Thread Benjamin Kaplan
On Sep 19, 2012 9:37 AM, andrea crotti andrea.crott...@gmail.com wrote: Well there is a process which has to do two things, monitor periodically some external conditions (filesystem / db), and launch a process that can take very long time. So I can't put a wait anywhere, or I'll stop

Re: subprocess call is not waiting.

2012-09-19 Thread Hans Mulder
On 19/09/12 18:34:58, andrea crotti wrote: 2012/9/19 Hans Mulder han...@xs4all.nl: Yes: using top is an observation problem. Top, as the name suggests, shows only the most active processes. Sure but ls -lR / is a very active process if you try to run it.. Not necessarily: It's quite

Re: subprocess call is not waiting.

2012-09-18 Thread andrea crotti
I have a similar problem, something which I've never quite understood about subprocess... Suppose I do this: proc = subprocess.Popen(['ls', '-lR'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) now I created a process, which has a PID, but it's not running apparently... It only seems to run

Re: subprocess call is not waiting.

2012-09-15 Thread paulstaten
That's a habit I'll make sure to avoid, then. Thanks, Chris! -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess call is not waiting.

2012-09-14 Thread Hans Mulder
On 13/09/12 19:24:46, woo...@gmail.com wrote: It possibly requires a shell=True, That's almost always a bad idea, and wouldn't affect waiting anyway. but without any code or any way to test, we can not say. That's very true. -- HansM -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess call is not waiting.

2012-09-14 Thread paulstaten
os.system worked fine, and I found something in another section of code that was causing the Too many open errors. (I was fooled, because output from subprocess call didn't seem to be coming out until the open files error. I'll go back and play with subprocess.call more, since os.system works.

Re: subprocess call is not waiting.

2012-09-14 Thread Wanderer
On Friday, September 14, 2012 8:22:44 AM UTC-4, pauls...@gmail.com wrote: os.system worked fine, and I found something in another section of code that was causing the Too many open errors. (I was fooled, because output from subprocess call didn't seem to be coming out until the open files

Re: subprocess call is not waiting.

2012-09-14 Thread Chris Rebert
On Fri, Sep 14, 2012 at 5:22 AM, paulsta...@gmail.com wrote: os.system worked fine, and I found something in another section of code that was causing the Too many open errors. (I was fooled, because output from subprocess call didn't seem to be coming out until the open files error. I'll

subprocess call is not waiting.

2012-09-13 Thread paulstaten
I have a subprocess.call which tries to download a data from a remote server using HTAR. I put the call in a while loop, which tests to see if the download was successful, and if not, loops back around up to five times, just in case my internet connection has a hiccup. Subprocess.call is

Re: subprocess call is not waiting.

2012-09-13 Thread Jean-Michel Pichavant
- Original Message - I have a subprocess.call which tries to download a data from a remote server using HTAR. I put the call in a while loop, which tests to see if the download was successful, and if not, loops back around up to five times, just in case my internet connection has a

Re: subprocess call is not waiting.

2012-09-13 Thread MRAB
On 2012-09-13 16:17, paulsta...@gmail.com wrote: I have a subprocess.call which tries to download a data from a remote server using HTAR. I put the call in a while loop, which tests to see if the download was successful, and if not, loops back around up to five times, just in case my internet

Re: subprocess call is not waiting.

2012-09-13 Thread MRAB
On 2012-09-13 16:34, Jean-Michel Pichavant wrote: - Original Message - I have a subprocess.call which tries to download a data from a remote server using HTAR. I put the call in a while loop, which tests to see if the download was successful, and if not, loops back around up to five

Re: subprocess call is not waiting.

2012-09-13 Thread woooee
It possibly requires a shell=True, but without any code on any way to test, we can not say. -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess call is not waiting.

2012-09-13 Thread paulstaten
Thanks, guys. MRAB-RedHat 6 64-bit, Python 2.6.5 JM-Here's the relevant stuff from my last try. I've also tried with subprocess.call. Just now I tried shell=True, but it made no difference. sticking a print(out) in there just prints a blank line in between each iteration. It's not until the 5

Re: subprocess call is not waiting.

2012-09-13 Thread Chris Rebert
On Thu, Sep 13, 2012 at 11:36 AM, paulsta...@gmail.com wrote: Thanks, guys. MRAB-RedHat 6 64-bit, Python 2.6.5 In your Unix shell, what does the command: type htar output? JM-Here's the relevant stuff from my last try. If you could give a complete, self-contained example, it would

Re: subprocess call is not waiting.

2012-09-13 Thread Chris Rebert
On Thu, Sep 13, 2012 at 8:17 AM, paulsta...@gmail.com wrote: I have a subprocess.call snip But it doesn't work as intended. snip Should I just go back to os.system? Did the os.system() version work? As of recent Python versions, os.system() is itself implemented using the `subprocess`