public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/11693] New: Should add script directory to PYTHONPATH
@ 2010-06-11 9:16 miki at dds dot nl
0 siblings, 0 replies; only message in thread
From: miki at dds dot nl @ 2010-06-11 9:16 UTC (permalink / raw)
To: gdb-prs
$ cat pythonpath.py
#!/usr/bin/env python
import sys
print sys.path
$ python pythonpath.py
['/home/miki/proj/modgdb/tests',
'/usr/local/lib/python2.6/dist-packages/pip-0.7.1-py2.6.egg',
'/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages/PIL',
'/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6',
'/usr/lib/python2.6/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.6/gtk-2.0',
'/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode',
'/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode',
'/usr/local/lib/python2.6/dist-packages']
$ gdb --silent
(gdb) source pythonpath.py
['/usr/local/lib/python2.6/dist-packages/pip-0.7.1-py2.6.egg',
'/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages/PIL',
'/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6',
'/usr/lib/python2.6/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.6/gtk-2.0',
'/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode',
'/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode',
'/usr/local/lib/python2.6/dist-packages']
(gdb) python import pythonpath
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named pythonpath
Error while executing Python code.
(gdb) quit
Adding the script directory to the PYTHONPATH is the default when executing
Python scripts from the shell. This is important for testing Python packages, or
using Python scripts which need to import modules not on the system default
PYTHONPATH.
Kind regards,
Alain
--
Summary: Should add script directory to PYTHONPATH
Product: gdb
Version: 7.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: python
AssignedTo: unassigned at sourceware dot org
ReportedBy: miki at dds dot nl
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11693
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-11 9:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-11 9:16 [Bug python/11693] New: Should add script directory to PYTHONPATH miki at dds dot nl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).