|
|||||||
1. Introduction
2. Installing Karrigell 3. The Web server 4. Configuration options 5. Working with Apache, LightTPD or Xitami 6. Programming 7. Debugging 8. Python scripts 9. CGI scripts 10. Karrigell Services 11. Python Inside HTML 12. HTML Inside Python 13. HTMLTags - generate HTML in Python 14. Including documents 15. Sessions 16. Authentication 17. Translation and Unicode |
8. Python scriptsRunning Python scripts with Karrigell is simple. Open you favorite Python code editor, create the following script :
and save it under the name hello.py in the Root Directory. Then type http://localhost/hello.py and you should see the message appear on your screen Python scripts run with Karrigell are ordinary Python scripts, except that
the
or, using the multi-line Python syntax :
If you write Python scripts that musn't be executed by Karrigell (for instance because they have a GUI-based interaction with the user) you can include this code at the top of your script :
Since |