From: Todd Z. <tm...@po...> - 2006-05-29 03:47:05
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Adam Guthrie wrote: > Todd Zullinger wrote: >> You shouldn't need to do this. I'm not a python expert >> (nor do I play one on TV), but I don't have that appended >> to my sys.path and import gpod works as expected here. >> What error do you get without it added? > > Here's the error: >>>> import gpod > Traceback (most recent call last): > File "<stdin>", line 1, in ? > ImportError: No module named gpod > > Is the site-packages/gpod/ directory in your sys.path already? Nope. $ python Python 2.4.2 (#1, Feb 12 2006, 03:59:46) [GCC 4.1.0 20060210 (Red Hat 4.1.0-0.24)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> for path in sys.path: print sys.path ... /home/tmz/python /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/gst-0.10 /usr/lib/python2.4/site-packages/gtk-2.0 >>> import gpod >>> What's your sys.path contain? What does the gpod subdir of site-packages look like? $ ls /usr/lib/python2.4/site-packages/gpod/ gpod.py gpod.pyc _gpod.so gtkpod.py gtkpod.pyc __init__.py __init__.pyc ipod.py ipod.pyc (You might also have the optimized *.pyo files.) > OK. One of the things that I think was not obvious was that > you have to configure with --with-python if you download > from cvs. I'll blame that on Nick. :) The thinking there is that since the bindings haven't been tested very much, building them by default might imply that they were ready for general usage. I've not had as much time to test and play with them as I would like, but I would bet that they are in pretty good shape, for rapidly evolving code, much as libgpod itself. But ./configure --help does say: --with-python=PATH build python bindings [default=no] > (I don't think you have to do this if you get the tarball.) I'm not at a system where I can test this quickly right now, but it shouldn't be different for the CVS snapshots. The released tarballs didn't have any autoconf build rules, so the bindings weren't built at all unless you went into bindings/python and ran make manually (adjusting the location of your python install in the Makefile). To make them build by default would just require changing a no to a yes, so if Nick and Jorg say they're ready to have that be the default, it can be done quickly. :) Hope you enjoy using the bindings. Jorg, Christophe, and others have done a sweet job on libgpod as has Nick on the python interface (which he's been improving on regularly). Later, - -- Todd OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp ====================================================================== I can trace my ancestry back to a protoplasmal primordial atomic globule. Consequently, my family pride is something in-conceivable. -- W. S. Gilbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl. iG0EARECAC0FAkR6bq8mGGh0dHA6Ly93d3cucG9ib3guY29tL350bXovcGdwL3Rt ei5hc2MACgkQuv+09NZUB1pUJgCgg5lQtGqGE/xq+BFfl6+H/vuYh1UAoI3EJzor lG9kZNDhOt1Va7jThQNe =+tJ+ -----END PGP SIGNATURE----- |