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: pgpXl898j06GM.pgp
Description: PGP signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux