Beesnest - Personal Application Server

Home Documents Downloads/Code About Contact Me

Python Script Engines for Beesnest

The Python script engine is called BnPython, this is the name of the library (dll/sa) and of the module you will import from Python. Place your Python code inside the <bnscript BnPython> ... </bnscript> tag (you can use other names as well). Don't forget to put the engine short configuration file in the Beesnest directory. You have to install the Python interpreter on your computer, and have the Python executable in the system search path. I used Python version 2.4 to build this script engine, but version 2.3 will work as well. This is a Storable script engine.

Note that the script timeout feature doesn't work yet. But it will be implemented in Beesnest, not in the script engines.

I have a bug - if calling sys.exit the entire Beesnest application will terminate!

Beesnest - Python Functions

Here is the list of Beesnest C++ functions, a Python script can use. All functions are already imported into the current module, but if you use other modules, you need to import them from BnPython.

Additional Functionality

In addition you can use the Python print command. All print commands though, will be always added to the end of the buffer, will not be sent with bn_flush or clear with bn_clear, and will not terminate the script if the buffer size goes over the limit. On the other hand, with Python print you can write the content of complex objects. If you don't need all the "fancy" stuff, you can use print.

Home Documents Downloads/Code About Contact Me