This is a copy of what I sent to a friend to solve Python on web issues.Hi Mick

It's no longer Shrink on web and just getting Python to work on web. Changing to Python 2.7 worked straight away. I assume the problem is the same one I had when trying to run Shrink from the desktop using Python 3.5. So all the samples I found are Python 2. The problem with Python 3.x is the change of syntax for the print command.

When I say worked straight away it gave a web page response in plain text and displayed the html code. I had to eliminate certain lines to get it to work as formatted HTML. It is all trial and error.

So even tho it is not in your current scope, I found it a challenge to make it work as CGI with IIS 7 on Windows 2008 server. I am providing what I learned as documentation in case I or you ever decide to use python on web.

One small syntax error and it gives"502 - Web server received an invalid response while acting as a gateway or proxy server."I'm sure there must be a way to give an intelligent syntax error response and indicate the line in error. The lines for cgi and cgitb don't seem to do anything.

I'm sure there must be a way to give an intelligent syntax error response and indicate the line in error. The lines for cgi and cgitb don't seem to do anything.

I dont use Windows servers. I use linux and apache. In which you can simply figure out any error by checking the apache error logs. For a simple syntax error, it shows the traceback in the error log in which you can check in real time. There must be something similar in windows server. But who knows, it is Windows after all.