|
|||||||
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. Karrigell Services 10. Python Inside HTML 11. HTML Inside Python 12. HTMLTags - generate HTML in Python 13. Including documents 14. Sessions 15. Authentication 16. 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 |