spyce
         
home     documentation     download     Spyce logo


Documentation - Runtime

Prev: 3.10.8 - Starting your first project Up: 3 - Runtime Next: 3.11.1 - Basic usage

3.11. Programmatic Interface

It is also possible to embed Spyce into another program. All you need is to run or embed a Python interpreter. Although other entry points into the engine code are possible, the most convenient entry points are in spyce.py:

  • spyceFileHandler( request, response, filename, [sig], [args], [kwargs], [config] )
  • spyceStringHandler( request, response, code, [sig], [args], [kwargs], [config] )

Either of these functions will execute some Spyce code within the context of some request object and send the output to the corresponding response object. spyceFileHandler gets the Spyce code to be executed from a file, while spyceStringHandler is passed Spyce code in a string.


Prev: 3.10.8 - Starting your first project Up: 3 - Runtime Next: 3.11.1 - Basic usage

Sub-sections:


Spyce logo
Python Server Pages
version 2.1.3
Spyce Powered SourceForge Logo