Python 2.5 in F8 has no module "test"
Todd Zullinger
tmz at pobox.com
Fri Nov 16 05:06:19 UTC 2007
Cameron Simpson wrote:
> On 14Nov2007 21:50, yapple <no-reply-gw at fcp.surfsite.org> wrote:
> | "test" is a builtin module in Python since 2.3. But in Pyhton 2.5 come with F8, I can not do "import test", why?
>
> On my Fedora 7 box the module test isn't in the "python" RPM, it's in
> the "python-devel" RPM:
>
> rpm -qf /usr/lib/python2.5/test/__init__.py
>
> So try:
>
> yum install python-devel
The tests were removed during the update from 2.5 to 2.5.1, in this
commit:
http://cvs.fedoraproject.org/viewcvs/rpms/python/F-8/python.spec?r1=1.106&r2=1.107
> I found the __init__.py file by going:
>
> strace -e trace=file python
>
> and then seeing what it opened when I said "import test".
FWIW (and for those who want a little less verbosity than strace
provides), you could also do something like this to find the file:
$ python
Python 2.5.1 (r251:54863, Oct 30 2007, 13:54:11)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gpod
>>> print gpod.__file__
/usr/lib/python2.5/site-packages/gpod/__init__.pyc
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
First, God created idiots. That was just for practice. Then He created
school boards.
-- Mark Twain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20071116/86402df8/attachment-0001.sig>
More information about the fedora-list
mailing list