CGI -> mod_python

  • Thread starter bernhard.heinzel
  • Start date
B

bernhard.heinzel

Hi,

it is a kind of nooby question. Is there a way to transfer a CGI python
script to mod_python without rewriting the code?

Thanks.
Bernhard
 
T

Thomas Jollans

Hi,

it is a kind of nooby question. Is there a way to transfer a CGI python
script to mod_python without rewriting the code?

Not that I know of, but thanks to the WSGI (specified in PEP 333:
http://www.python.org/dev/peps/pep-0333/) you should be able to convert
your app to WSGI, which will run on mod_python, relatively easily
(depending on your code; 'print' won't work anymore)
 
P

Paul Boddie

it is a kind of nooby question. Is there a way to transfer a CGI python
script to mod_python without rewriting the code?

Had you used WebStack [1] to begin with, this migration would involve
changing a few lines of glue code. However, as others have pointed out,
WSGI may be an appropriate API to target for a modest rewrite of the
code, given substantial resemblances to aspects of the CGI API.

Paul

[1] http://www.python.org/pypi/WebStack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top