English / Japanese
Last modified: 3 Feb 2010
pythononlisp-ex is liitle extension of python on lisp It can call python function from common lisp.
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
To install,
Type below commands.$ sbcl (asdf-install:install "http://www2s.biglobe.ne.jp/~niitsuma/pythononlisp-ex-x86-64.current.tar.gz")
$ sbcl (asdf-install:install "http://www2s.biglobe.ne.jp/~niitsuma/pythononlisp-ex-i386.current.tar.gz")