----------------------------------------------------- PY_SAIL - write SAGE applications in python ----------------------------------------------------- Author: Ratko Jagodic Last Update: April 19, 2007 (updated for SAGE 2) PREREQUISITES: ---------------------------------------------------- - python (any fairly recent version should work) - gcc compiler - compiled SAGE and the $SAGE_DIRECTORY environment variable set up HOW TO INSTALL: ---------------------------------------------------- - run the "install_me" script - this will create the py_sail.so and put it into $SAGE_DIRECTORY/lib - it may also create another file ending in .egg-info (if it's there, leave it, if not, don't worry) RUN THE TEST EXAMPLE: ---------------------------------------------------- - test.py is an example of how to write your applications with py_sail - since this is python, there is no need to install the example but you still need to configure it - in your $SAGE_DIRECTORY/bin/appLauncher/sage.conf add something like this (change the paths of course): pysail_test { configName test nodeNum 1 Init 100 100 600 600 exec 127.0.0.1 python /home/evl/rjagodic/sage2/app/py_sail/test.py nwProtocol tvTcpModule.so binDir /home/evl/rjagodic/sage2/app/py_sail staticApp } - now you can run the test from the SAGE UI by clicking on its icon and a small rectangle with a gradient should show up on your SAGE display WRITE YOUR OWN APPLICATIONS WITH PY_SAIL: ---------------------------------------------------- - the main steps go something like this: (1) import py_sail (2) initialize your application with py_sail.initSail() (3) get your buffer and send it to py_sail with py_sail.setBuffer() (you use this function every time you want to swap a buffer) (4) check for sail messages with py_sail.checkMessages()