Version 6 (modified by lloydw, 10 years ago) |
---|
Overview
RocketPython can be used in an application that extends or embeds Python. The only limitation is that your application initialises Rocket with the necessary System and Render interfaces, but these can easily be done from a custom Python module.
To start using RocketPython simply import the module as you would any other extension. RocketPython will then plug itself into the running Rocket instance. It is important to import RocketPython before you create any Rocket Contexts, Documents or Elements otherwise you will not have access to these items from Python.
For a full list of accessable classes and methods please see the RocketPython API Reference.
Requirements
RocketPython requires Python 2.5 and Boost::Python 1.34.
NOTE: On the Windows platform rocket assumes you will be compiling against the debug python libraries. All other platforms expect the release version.
Getting Started
If you're developing on Windows you can download our pre-built support package which includes both of these libraries.
On other platforms you'll need to install and compile both the libraries and then update config.py (in the build directory) with the relevant paths before attempting to compile any python related code. See README.TXT in the samples folder for more information.
The best place to start exploring RocketPython is to look at the PyInvaders sample application which is a reword of the standard Invaders sample but with python support. There is also a step by step tutorial describing the steps taken to do the conversion.