|
|||||||
1. Introduction
2. Installing Karrigell 3. The Web server 4. Working with Apache or Xitami 5. Programming 6. Debugging 7. Python scripts 8. Karrigell Services 9. Python Inside HTML 10. HTML Inside Python 11. HTMLTags - generate HTML in Python 12. Including documents 13. Sessions 14. Authentication 15. Internationalization |
7. 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 |