These are just a few basic things you will need to ensure that you can use Python with CS and CEL.
1. First make sure you have Python installed
Python.org is a good place to get Python and find tutorials.
SWIG is a library which connects programs written in C/C++ with a variety of high-level programming languages. The CS/CEL python bindings use SWIG to generate the Python API. So you will need SWIG installed before you compile CS and CEL in order for them to create the python bindings. Tested versions of swig include 1.3.24 or 1.3.27, 1.3.28, 1.3.29.
If you needed to install SWIG and/or Python, you will need to reconfigure and recompile CS and CEL.
You should check you have the following: inside cs directory: cspace.py and _cspace.pyd (or _cspace.so on unix like systems) inside cel directory: blpython.dll (ot blpython.so on unix like systems) and blcelc.py
There are several apps you can run to test the python bindings are working correctly.
- For cs bindings: run pysimp from the crystalspace dir.
- For cel bindings: run start_smallgame.sh from the cel dir. Note for this the crystalspace python module (cspace.py and _cspace.*) must be in the pythonpath (setting PYTHONPATH to the CRYSTAL dir should be enough at this point).
Back to PyCrystal