-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example in section 5.3 "Pure Embedding" doesn't work. #42771
Comments
|
I want to use Python to script an existing application. I am using pkgsrc on NetBSD. I have run into two issues. First, I made the simple change to use Second, python can't find the module. I named the file It turns out that I had to set PYTHONPATH in my The odd thing about the path issue is that if I ran the |
|
Logged In: YES The PyDict_GetAttrString issue is corrected in the current No clue about the other. |
|
Logged In: YES Great to hear about PyDict_GetAttrString(). I assume that It turns out the second issue deals with path processing in To be more specific, I had my code print Py_GetPath(), and I C code looking for foo.py (which is in '.'):
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 Any thoughts? Is there a different list or FAQ I should look at? |
|
Is this still valid? |
|
I just fell over the PYTHONPATH='' bit aswell. So yes, this is still valid. |
|
I have updated the example in the doc. This default behavior is introduced because of security reason as detailed in http://bugs.python.org/issue5753 |
|
This issue is 13 years old, inactive for 5 years, has a patch: it's far from being "newcomer friendly", I remove the "Easy" label. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: