Zope html progress result generate
Hello ! In mod_python I can send the result to the browser with o.write(Msg) command immediately (o is the object of the connection). So I can show the progress of the long operation like this: o.content_type="html" o.write("Long process with progress") for i in range(1,101): o.write(str(i)+"% processed"); sleep(100) o.write("Finished...") So I can see the whole progress in the browser. I want to create same function in zope. Can I do it ? Thanx for every help ! -- Best regards, fowlertrainer mailto:fowlertrainer@anonym.hu
fowlertrainer@anonym.hu wrote:
I want to create same function in zope. Can I do it ?
Yup. but it's fairly deep voodoo involving REQUEST.RESPONSE.write()... rather you than me... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
RESPONSE.write(text) RESPONSE.flush()
-----Original Message----- From: zope-bounces@zope.org [mailto:zope-bounces@zope.org] On Behalf Of fowlertrainer@anonym.hu Sent: Wednesday, March 10, 2004 1:56 AM To: zope@zope.org Cc: gal.laszlo@peto.hu Subject: [Zope] Zope html progress result generate
Hello !
In mod_python I can send the result to the browser with o.write(Msg) command immediately (o is the object of the connection).
So I can show the progress of the long operation like this:
o.content_type="html" o.write("Long process with progress") for i in range(1,101): o.write(str(i)+"% processed"); sleep(100) o.write("Finished...")
So I can see the whole progress in the browser.
I want to create same function in zope. Can I do it ?
Thanx for every help !
-- Best regards, fowlertrainer mailto:fowlertrainer@anonym.hu
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Wed, 2004-03-10 at 16:18, zope@netchan.cotse.net wrote:
RESPONSE.write(text) RESPONSE.flush()
I use Zope behind Apache with mod_rewrite and mod_proxy. This method doesn't seems to work in this configuration... It only works when you have a direct access to Zope. Thierry
-----Original Message----- From: zope-bounces@zope.org [mailto:zope-bounces@zope.org] On Behalf Of fowlertrainer@anonym.hu Sent: Wednesday, March 10, 2004 1:56 AM To: zope@zope.org Cc: gal.laszlo@peto.hu Subject: [Zope] Zope html progress result generate
Hello !
In mod_python I can send the result to the browser with o.write(Msg) command immediately (o is the object of the connection).
So I can show the progress of the long operation like this:
o.content_type="html" o.write("Long process with progress") for i in range(1,101): o.write(str(i)+"% processed"); sleep(100) o.write("Finished...")
So I can see the whole progress in the browser.
I want to create same function in zope. Can I do it ?
Thanx for every help !
-- Best regards, fowlertrainer mailto:fowlertrainer@anonym.hu
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
FLORAC Thierry wrote:
On Wed, 2004-03-10 at 16:18, zope@netchan.cotse.net wrote:
/RESPONSE.write(text) RESPONSE.flush() /
I use Zope behind Apache with mod_rewrite and mod_proxy. This method doesn't seems to work in this configuration...
Yeah, I expect you'd have to do some stuff in Apache too..
It only works when you have a direct access to Zope.
...which I wouldn't recommend in production... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
-----Original Message----- From: FLORAC Thierry [mailto:thierry.florac@onf.fr] Sent: Thursday, March 11, 2004 3:08 AM To: zope@netchan.cotse.net Cc: zope@zope.org; gal.laszlo@peto.hu Subject: RE: [Zope] Zope html progress result generate
On Wed, 2004-03-10 at 16:18, zope@netchan.cotse.net wrote:
RESPONSE.write(text) RESPONSE.flush()
I use Zope behind Apache with mod_rewrite and mod_proxy. This method doesn't seems to work in this configuration... It only works when you have a direct access to Zope.
Thierry
Same config here, it works for me. Regards, Sandor
On Thu, 2004-03-11 at 18:55, zope@netchan.cotse.net wrote:
-----Original Message----- From: FLORAC Thierry [mailto:thierry.florac@onf.fr] Sent: Thursday, March 11, 2004 3:08 AM To: zope@netchan.cotse.net Cc: zope@zope.org; gal.laszlo@peto.hu Subject: RE: [Zope] Zope html progress result generate
On Wed, 2004-03-10 at 16:18, zope@netchan.cotse.net wrote:
RESPONSE.write(text) RESPONSE.flush()
I use Zope behind Apache with mod_rewrite and mod_proxy. This method doesn't seems to work in this configuration... It only works when you have a direct access to Zope.
Thierry
Same config here, it works for me.
So I suppose that my problem comes from my Apache rewrite rules. Could you send me a copy of yours ?? Thanks, Thierry P.S. : I also use SiteRoot (not VirtualHostMonster) and mod_gzip ? Could my problem come from here ?? -- Linux every day, keeps Dr Watson away... http://gpc.sourceforge.net -- http://www.ulthar.net
I don't think that rewrite rules have to do anything with this. Anyway, here's my apache config: <VirtualHost x.x.x.x:443> SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown ServerName x.y.z ServerAdmin x@y.z SSLEngine on SSLCertificateFile certs/x.crt SSLCertificateKeyFile certs/private/x.key ErrorLog logs/x_error_log CustomLog logs/x_access_log combined CustomLog logs/x_sslreq_log sslrequest RewriteEngine on RewriteRule ^/(.*) http://127.0.0.1:8001/VirtualHostBase/https/%{SERVER_NAME}:%{SERVER_PORT }/Instances/a/VirtualHostRoot/$1 [P] </VirtualHost> <VirtualHost x.x.x.x:444> ServerName x.y.z SSLEngine on SSLCertificateFile certs/x.crt SSLCertificateKeyFile certs/private/x.key RewriteEngine on RewriteRule ^/(.*) http://127.0.0.1:8001/VirtualHostBase/https/%{SERVER_NAME}:%{SERVER_PORT }/VirtualHostRoot/$1 [P] </VirtualHost> First VH is the 'main entrance' for the users, the second is for maintenance.
P.S. : I also use SiteRoot (not VirtualHostMonster) and mod_gzip ? Could my problem come from here ??
I could imagine that mod_gzip waits till the completion of the response before sending the results back. Regards, Sandor
participants (4)
-
Chris Withers -
FLORAC Thierry -
fowlertrainer@anonym.hu -
zope@netchan.cotse.net