[users@httpd] Apache 2.0.53 will not display png from 4 line python script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a 4 line python script which should display a png that is in the same directory as the script. The script is:

#!d:/apps/Python23/python.exe

fp = open('tmp.png','rb')
print "Content-type: image/png\n"
print fp.read()
fp.close()

However all the script generates is:

The image “http://shook-m2/cgi-bin/plot.py”; cannot be displayed, because it contains errors.

plot.py is the name of the script.

I am using:
Python 2.3 (Enthought version)
Apache 2.0.53
Windows XP Sp2

The script is in cgi-bin. Other python scripts work fine e.g. hello world.

Any ideas would be much appreciated.

Thanks, Simon

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux