Re: Building own module

Does anyone have a clue as to why my module does not load outside of the “test” environment?

Does your PYTHONPATH include the path to where ever you installed the module?

My PYTHONPATH was empty. I set the PYTHONPATH and it worked. Thanks.

Another question: Why do the scripts in gnuradio-examples work without
setting the PYTHONPATH?

Daniel


Any questions? Get answers on any topic at www.Answers.yahoo.com. Try
it now.

On Tue, Dec 05, 2006 at 08:30:20AM -0800, Daniel G. wrote:

Does anyone have a clue as to why my module does not load outside
of the “test” environment?

Does your PYTHONPATH include the path to where ever you installed the module?

My PYTHONPATH was empty. I set the PYTHONPATH and it worked. Thanks.

Good.

Another question: Why do the scripts in gnuradio-examples work
without setting the PYTHONPATH?

Your python is probably built with
/usr/local/lib/python/site-packages in sys.path.

E.g.,

[eb@cyan dl]$ unset PYTHONPATH
[eb@cyan dl]$ python
Python 2.4.2 (#1, Oct 13 2006, 17:11:24)
[GCC 4.1.0 (SUSE Linux)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import sys
from pprint import pprint
pprint(sys.path)
[’’,
‘/usr/local/lib/python2.4/site-packages/setuptools-0.6c1-py2.4.egg’,
‘/usr/local/lib/python2.4/site-packages/vobject-0.4.2-py2.4.egg’,
‘/usr/local/lib/python2.4/site-packages/python_dateutil-1.1-py2.4.egg’,
‘/usr/lib/python24.zip’,
‘/usr/lib/python2.4’,
‘/usr/lib/python2.4/plat-linux2’,
‘/usr/lib/python2.4/lib-tk’,
‘/usr/lib/python2.4/lib-dynload’,
‘/usr/lib/python2.4/site-packages’,
‘/usr/lib/python2.4/site-packages/Numeric’,
‘/usr/lib/python2.4/site-packages/PIL’,
‘/usr/lib/python2.4/site-packages/dbus’,
‘/usr/lib/python2.4/site-packages/gtk-2.0’,
‘/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode’,
‘/usr/local/lib/python2.4/site-packages’]

Eric