Upload of binary files

Steve Holden sholden at holdenweb.com
Wed Mar 19 18:15:21 EST 2003


"Ben Hutchings" <do-not-spam-ben.hutchings at businesswebsoftware.com> wrote in
message
news:slrnb7gmju.12c.do-not-spam-ben.hutchings at tin.businesswebsoftware.com...
> In article <cY1da.57265$JE5.55855 at news2.central.cox.net>, Steve Holden
wrote:
> <snip>
> > One last thing you might try if your web server honors the shebang
> > convention (as Xitami and Apache both do, for example, even on Windows)
is
> > to use a first line similar to
> >
> > #!C:/python22/python -u
> >
> > This will cause Python to run unbuffered, and should obviate the need to
> > explicitly use the mscvrt module.
>
> Well it's not the buffering but the text translation that's the problem,
> but I see that -u controls both of these.  This looks like a much cleaner
> solution.
>
> (The command-line options don't seem to be documented in the standard
> Python documentation.  It seems to me that they deserve a bit more than
> the description that python -h prints.)

Good catch - I realized after posting that I'd only described part of the
solution. Maybe we need CommandLineOptionU page?

Anyway, original credit from me would be to the effbot, whom I remember
giving me pretty much the advice that I gave you (though naturally without
the grace and panache of this author's modest efforts).

Glad it works. For low-volume intranet stuff CGI is still eminently
workable, and adequate, and easily-managed. Locally (like, your own
localhost interface)

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Register for PyCon now!            http://www.python.org/pycon/reg.html







More information about the Python-list mailing list