Non Parsed Headers in Python

R

Radovan Garabik

Fuzzyman said:
How do I make a python CGI output whilst it is still running - how do
I tell the server not to buffer the output ?

I am using sys.stdout.flush() at the appropriate place of script.
It works well

--
-----------------------------------------------------------
| Radovan Garabík http://melkor.dnp.fmph.uniba.sk/~garabik/ |
| __..--^^^--..__ garabik @ kassiopeia.juls.savba.sk |
-----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!
 
?

=?ISO-8859-1?Q?Gerhard_H=E4ring?=

Fuzzyman said:
How do I make a python CGI output whilst it is still running - how do
I tell the server not to buffer the output ?

I have seen instructions for Perl, but not for python......

Starting your CGI script with

#!/usr/bin/env python -u

should do the trick.

-- Gerhard
 
P

Peter Hansen

Fuzzyman said:
Aha.........
I'm not sure which of these two was the right answer..... but I've
used both and it's working.

Either should have worked, and now one of them is redundant. If
you don't mind using the "-u" option you can certainly save yourself
the trouble of inserting .flush() calls everywhere.

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top