English / Japanese

python-on-lisp-ex

Last modified: 3 Feb 2010

What's pythononlisp-ex?

pythononlisp-ex is liitle extension of python on lisp It can call python function from common lisp.

Sample code

To use pythononlisp-ex , you can write a code like below.

$clisp
(asdf:operate 'asdf:load-op :pythononlisp) 
(py::py "print \"Hello from python\"")

(py::py "import numpy")
(py::py "xd=numpy.linalg.norm([6,5])")
(py::py "print xd") ;7.81024967591

(print (py::pyj "len" (list 1 5 6 ) ) ) ;3 
(print (py::pyj "range" 2 7)) ;(2 3 4 5 6) 
(py::setvalj "a" (list 2 3 4))
(py::py "print a") ;[2, 3, 4]
(print (py::getvalj "a")) ;(2 3 4) 


(py::pyj "pylab.plot" '(1 2 3 4) '(4 3 2 1))
(py::py "pylab.show()") ;graph show

Requirements

pythononlisp-ex require I have checked the environments below.

Download

Installation

To install,

Type below commands.

Restrictions

ChangeLog

2010-02-03: release version 0.7 for 64bit OS , 32bit OS
2009-05-18: release version 0.6

hirotaka.niitsuma@gmail.com