Message60866
I want to use Python to script an existing application.
So I was trying the code on
http://docs.python.org/ext/pure-embedding.html and
found it didn't work.
I am using pkgsrc on NetBSD.
I have run into two issues. First,
PyDict_GetAttrString() does not exist. I have found
this to be true for both Python 2.2 and 2.4, the two
versions I currently have installed.
I made the simple change to use
PyObject_GetAttrString(), which looks right.
Second, python can't find the module. I named the file
multiply.py, and it wouldn't load.
It turns out that I had to set PYTHONPATH in my
envirnment to make it work. Setting it to '' (empty
string) worked.
The odd thing about the path issue is that if I ran the
python interpreter, it was able to find the module w/o
my changing the environment. |
|
Date |
User |
Action |
Args |
2008-01-20 09:58:24 | admin | link | issue1398781 messages |
2008-01-20 09:58:24 | admin | create | |
|