Re: Running long script in the background

2007-02-07 Thread [EMAIL PROTECTED]
On Feb 8, 10:42 am, "Karthik Gurusamy" <[EMAIL PROTECTED]> wrote: > On Feb 6, 5:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I am trying to write a python cgi that calls a script over ssh, the > > problem is the script takes a very long time to execute so Apache > > make

Re: Running long script in the background

2007-02-07 Thread Karthik Gurusamy
On Feb 6, 5:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to write a python cgi that calls a script over ssh, the > problem is the script takes a very long time to execute so Apache > makes the CGI time out and I never see any output. The script is set > to print a

Re: Running long script in the background

2007-02-07 Thread Jordan
On Feb 6, 8:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to write a python cgi that calls a script over ssh, the > problem is the script takes a very long time to execute so Apache > makes the CGI time out and I never see any output. The script is set > to print a

Re: Running long script in the background

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 6, 11:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > output = os.popen(command, 'r', 1) OOPS... I imagine the ridiculous buffer size is unnecessary... I was trying to get it to work with the original for loop iterating on output, it should work fine without it. Pete -- http

Re: Running long script in the background

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 6, 5:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to write a python cgi that calls a script over ssh, the > problem is the script takes a very long time to execute so Apache > makes the CGI time out and I never see any output. The script is set > to print a

Re: Running long script in the background

2007-02-06 Thread Gabriel Genellina
En Tue, 06 Feb 2007 16:44:52 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > On Feb 6, 2:02 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >> On 6 Feb 2007 07:37:33 -0800, "[EMAIL PROTECTED]" >> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: >> >> > Everything works

Re: Running long script in the background

2007-02-06 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > Web pages can show output as it's sent. For testing I created a > script on the server that untars a 600 meg volume, I can see each file > name show up in my browser instantly, just like it should. The other > script I'm trying to run won't show anything until the enti

Re: Running long script in the background

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 6, 2:02 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On 6 Feb 2007 07:37:33 -0800, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > Everything works fine until I call the popen function, then it > > freezes. What I want is to print the o

Re: Running long script in the background

2007-02-06 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > I tried flushing stdout and the same thing happens. As soon as the > os.popen(command) line runs it stops there, the next print statement > never even runs. > > I've also tried using os.spawnv to make the process run in the > background but then the ssh command never r

Re: Running long script in the background

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 6, 10:37 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Feb 6, 8:36 am, "jasonmc" <[EMAIL PROTECTED]> wrote: > > > > Does anybody know a way to make output show in real time? > > > You can put: #!/usr/bin/python -u > > at the top of the script to have unbuffered binary stdout and st

Re: Running long script in the background

2007-02-06 Thread [EMAIL PROTECTED]
On Feb 6, 8:36 am, "jasonmc" <[EMAIL PROTECTED]> wrote: > > Does anybody know a way to make output show in real time? > > You can put: #!/usr/bin/python -u > at the top of the script to have unbuffered binary stdout and stderr. Thanks. I tried that but it still times out waiting for output. Eve

Re: Running long script in the background

2007-02-06 Thread Thomas Guettler
[EMAIL PROTECTED] wrote: > Hello, > > I am trying to write a python cgi that calls a script over ssh, the > problem is the script takes a very long time to execute so Apache > makes the CGI time out and I never see any output. The script is set > to print a progress report to stdout every 3 secon

Re: Running long script in the background

2007-02-06 Thread jasonmc
> Does anybody know a way to make output show in real time? You can put: #!/usr/bin/python -u at the top of the script to have unbuffered binary stdout and stderr. -- http://mail.python.org/mailman/listinfo/python-list

Running long script in the background

2007-02-06 Thread [EMAIL PROTECTED]
Hello, I am trying to write a python cgi that calls a script over ssh, the problem is the script takes a very long time to execute so Apache makes the CGI time out and I never see any output. The script is set to print a progress report to stdout every 3 seconds but I never see any output until t