convert to a python cgi application