Stdin problems in cgi
Richard van de Stadt
stadt at cs.utwente.nl
Thu Sep 21 12:40:30 CEST 2000
> Hi folks
> I am using oython for my cgi dev. I wrote a page with a few file upload
> buttons. When I try to submit files , the cgi script reads the files ok
> as long as they are not binary. If they are binary it waits for ever.
> Somewhere, on thin news group I read that I have to change stdin to
> bainary mode but the python documentation does not give any clues.
I find this hard to believe. Could it be that the binary files you try
to upload are too big to fit on the default tempdir that is used
internally? Does it help if you do this:
os.environ['TMPDIR'] = 'SomeDirThatsBigEnough'
>From tempfile.py it seems that '/usr/tmp', '/tmp'
and 'c:\temp' are the defaults.
> So how do yuo set stdin to binary.
> Your help would be appreciated.
> A man needs to sleep for 36 hours a day atleast.
newSig = string.replace (theAboveLine, 'sleep', 'be awake')
More information about the Python-list