Calling Python from Allegro Lisp
Thomas Guettler
zopestoller at thomas-guettler.de
Fri Jul 12 07:59:49 EDT 2002
Hi!
I have an old application which needs to call python.
The old app is written in allegro lisp.
I tried the following:
(defparameter hlib "c:\\winnt\\system32\\python22.dll")
(probe-file hlib)
(ct:defun-dll Py_Initialize()
:return-type :void
:library-name hlib
:entry-name "Py_Initialize")
(ct:defun-dll PyRun_SimpleString((s :char *))
:return-type :long
:library-name hlib
:entry-name "PyRun_SimpleString")
(Py_Initialize)
(setq foo "print 'foo'")
(PyRun_SimpleString (cref (ct:char *) foo 0))
But get:
"""
The first element (CREF (CHAR *) foo 0) of a function
application is not a function name
"""
What could be wrong. I am new to lisp
thomas
More information about the Python-list
mailing list