python mapscript with IIS

william paul williampaul28 at YAHOO.COM
Fri Nov 3 09:22:02 EST 2006


Skipped content of type multipart/alternative-------------- next part --------------
#!C:\Python24\python.exe %s %s
import mapscript
import random

map_path = "e:/orsova/mapserver/orsova/"
map_file = "mapserver.map"
image_name = "python_nr" + str(random.randrange(999999)).zfill(6) + ".png"
map = mapscript.mapObj(map_path+map_file)
img = map.draw()
img.save("e:/orsova/mapserver/orsova/tmp/" + image_name)

print "Content-type: text/html"
print
print "<html>"
print "<header><title>Python Mapscript Hello World</title></header>"
print "<body>"
print """
<form name="hello" action="mapscript.py" method="POST">
<input type="image" name="img" src="/tmp/%s">
</form>
""" % image_name
print "</body>"
print "</html>"


More information about the mapserver-users mailing list