Re: Python 2.5 in F8 has no module "test"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cameron Simpson wrote:
> On 14Nov2007 21:50, yapple <no-reply-gw@xxxxxxxxxxxxxxxx> 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

Attachment: pgpdyKBbxIXO8.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux