Steve Holden wrote: > Under Windows 95 using Apache/1.3.19 and ActivePython (original build) I get > something which IE 5.5 reports as being a 2326-byte GIF file containing a > 259 x 32-pixel image whose appearance bears no relation to the Apache logo: http://www.python.org/doc/FAQ.html#7.12 Q. cgi.py (or other CGI programming) doesn't work sometimes on NT or win95! summary: the output stream is opened in text mode under Windows. to get binary mode, run the interpreter with the -u option. > #!C:\Python20\python this might work: #!C:\Python20\python -u > ## > ## image.py: serve a GIF image > ## > import sys, base64 > o = open("C:/Program Files/Apache > Group/Apache/htdocs/apache_pb.gif","rb").read() > sys.stdout.write('Content-Type: image/gif\r\n') > sys.stdout.write('Content-Length: %d\r\n\r\n' % len(o)) > sys.stdout.write(o) Cheers /F
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4