Message60868
Logged In: YES
user_id=148388
Great to hear about PyDict_GetAttrString(). I assume that
PyObject_GetAttrString() was the correct change?
It turns out the second issue deals with path processing in
the embedded code being somehow different from processing in
the interpreter. I think the interpreter sets something up
that isn't present for the embedded example. I will really
appreciate it if we could figure out what's different and
add it to the docs. The pictured behavior for "call" is
exactly what I want, but not what I get.
To be more specific, I had my code print Py_GetPath(), and I
compared that with sys.path from the interpreter.
C code looking for foo.py (which is in '.'):
> ./obj.i386/test foo
Path is
'/usr/pkg/lib/python24.zip:/usr/pkg/lib/python2.4/:/usr/pkg/lib/python2.4/plat-netbsd3:/usr/pkg/lib/python2.4/lib-tk:/usr/pkg/lib/python2.4/lib-dynload'
ImportError: No module named foo
utest: loading module foo: No such file or directory
In the python interpreter:
> python2.4
Python 2.4.1 (#1, Dec 28 2005, 15:58:29)
[GCC 3.3.3 (Wasabi NetBSD nb3 20040520)] on netbsd3
Type "help", "copyright", "credits" or "license" for more
information.
>>> import sys
>>> print sys.path
['', '/usr/pkg/lib/python24.zip', '/usr/pkg/lib/python2.4',
'/usr/pkg/lib/python2.4/plat-netbsd3',
'/usr/pkg/lib/python2.4/lib-tk',
'/usr/pkg/lib/python2.4/lib-dynload',
'/usr/pkg/lib/python2.4/site-packages']
The key difference is the '' at the front of the path in the
interpreter.
Any thoughts? Is there a different list or FAQ I should look at? |
|
Date |
User |
Action |
Args |
2008-01-20 09:58:24 | admin | link | issue1398781 messages |
2008-01-20 09:58:24 | admin | create | |
|