PyScilab. Scilab into Python. Release 0.0.1: Acid apple.
Rodrigo Benenson
rodrigob@elo.utfsm.cl
Sat, 17 May 2003 12:50:27 +0000
PyScilab. Scilab into Python.
Release 0.0.1: Acid apple.
This is an inmature release oriented to programmers who could help to
the development of the package.
The code is functional but there are some topics missing.
The source code is aviable at:
http://pdilib.sf.net
If you don't know what is python nor scilab
http://www.scilab.org, the best free matrix computation package aviable.
http://www.python.org, the best free general use scripting language aviable.
README ---------------------------------------------------------------
PyScilab. Rodrigo Benenson. 2003. under GPL.
Release 0.0.1: THIS AN HACKER RELEASE, NOT RECOMENDED FOR END USERS
The main objective are:
- allow to python devellopers to use a true matrix processing system.
- allow the scilab users to use they function in other contexts.
- to have a true pythonic interface.
The expected methods are:
- init and destroy scilab sessions
- create matrix, vectors, lists, (sciobjects in general)
- automaticaly detect the aviable functions
- offer a pythonic interface to call all of this functions
- allow operators between sci objects
- allow plotting
The aviables methods are:
- init an scilab session
- create matrix, vectors, numbers
- allow pythonic scilab code calls
- allow pythonic scilab data retreival
Example session (real example, with release 0.1):
scilab = ScilabSession(SCI= os.getcwd() + '/scilab-2.7/', STAR =
os.getcwd() + '/scilab.star', )
print 'setting a, and b'
a = [[1,2],[3,4]]
b = [[5,6],[7,8]]
scilab['a'] = a
scilab['b'] = b
print 'a:', scilab.get('a')
print 'b:', scilab.get('b')
print
print 'calling "c= a + b"'
scilab.call('c= a + b')
print 'Obtaining the result'
print 'c : ', scilab['c']
print
print 'calling "c= a * b"'
scilab.call('c= a * b', a= [5,3], b= 2)
print 'c : ', scilab['c']
print
print 'calling "e= svd(a), a = [1,2;3,4]"'
scilab.call('e= svd(a)', a= a)
print 'Obtaining the result'
print 'e:', scilab['e']
print
returns
[rodrigob@localhost pyscilab]$ python2.2 ./pyscilab.py
PyScilab test.
==========
scilab-2.7
Copyright (C) 1989-2003 INRIA/ENPC
==========
Starting with exec("/home/rodrigob/projets/pyscilab/scilab.star",-1);quit;
Startup execution:
loading initial environment
setting a, and b
a: [[ 1. 2.]
[ 3. 4.]]
b: [[ 5. 6.]
[ 7. 8.]]
calling "c= a + b"
Obtaining the result
c : [[ 6. 8.]
[ 10. 12.]]
calling "c= a * b"
c : [[ 10.]
[ 6.]]
calling "e= svd(a), a = [1,2;3,4]"
Obtaining the result
e: [[ 5.4649857 ]
[ 0.36596619]]
Know bugs:
- Any window invoking function should crash the python (please fix it!)
- The instalation is tricky and will probably fail
- If the objects are not matrix, vectors or numbers, everything crash
Feedback:
This realease is an acid green apple. Please, help us, report a
succesfull compilation, report an unsuccesfull compilation,
hack the setup.py to be more flexible, hack the code to allow plotting,
report a successfull usage or just say hello.
Please fell free to mail any feedback at
rodrigob at elo dot utfsm dot cl
Other notes:
The development is made using Leo, the outline editor.
http://leo.sf.net
Look at the pyscilab.leo file for more info.