From hirotaka.niitsuma at gmail.com Wed Feb 3 06:29:26 2010 From: hirotaka.niitsuma at gmail.com (Niitsuma Hirotaka) Date: Wed, 3 Feb 2010 15:29:26 +0900 Subject: [python-on-lisp-devel] little modify and extension of pythononlisp Message-ID: <6ce56e1a1002022229m1c6969f7s3e652e6a7aff4cdf@mail.gmail.com> I write little modify and extension of pythononlisp http://www2s.biglobe.ne.jp/~niitsuma/pythononlispex.html usage (asdf-install:install "http://www2s.biglobe.ne.jp/~niitsuma/pythononlisp-ex06.tar.gz") (asdf:operate 'asdf:load-op :pythononlisp) (py::py "print \"Hello from python\"") (py::pyj "numpy.reshape" (list 1 2 3 4 5 6 ) (list 2 3)) ; -> ((1 2 3) (4 5 6)) (py::pyj "numpy.dot" '((1 2) (3 4)) '((1 2) (3 4)) ) ; -> ((7 10) (15 22)) (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::py "import numpy") (py::py "xd=numpy.linalg.norm([6,5])") (py::py "print xd") ;7.81024967591