Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes?
CGI? Maybe something new? WSGI | FastCGI ?
Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes?
CGI? Maybe something new? WSGI | FastCGI ?
web.py includes a server... It will do the trick for small jobs.
By the way, Apache works on windows.
Yes you can. But you can also use apache on windows. If you go the IIS way there's only CGI and it's pretty hard to set up. You can also use python based server like CherryPy which is pretty good and will work on all platforms with python.
Some frameworks like django support both CGI and WSGI, so you don't have to worry about the details of WSGI or CGI much.
If you ask me, WSGI is the future for python web apps.
Yes, if you use CGI, FastCGI or depending on your framework, even a self-contained web server (so IIS and Apache would be a reverse-proxy) then that would all work.
The difference will be the configuration of the OS-specific servers, and also your Python environment on each OS. So you may find yourself doing a small bit of work at the beginning to make sure your paths are right, etc.
A rather big Python based web framework is ZOPE.
Zope is an open source application server for building content management systems, intranets, portals, and custom applications. The Zope community consists of hundreds of companies and thousands of developers all over the world, working on building the platform and Zope applications. Zope is written in Python, a highly-productive, object-oriented scripting language
ZOPE is available on Linux and Windows, and you can use Python to write your Zope Web Apps (it includes a simpler templating system, too).
consider also the possibility of using web2Py, or XML-RPC implementation, or Twisted...
Writing python web apps is a topic on itself, but I would say that by default, it will be portable on multiple servers / platforms.
When developping python web applications, you will often use frameworks that provide their own web server. For performance reasons, you might want to place it behind apache, but it is not even necessary, however, you might get a performance boost by placing it behind an apache server.
Some of the most popular frameworks for web python are : Plone, Zope, CherryPy and TurboGears, only to name a few.
Under apache, you could also use python server pages through mod_python, and since apache runs on windows too, this would aslo be portable.