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

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

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


> 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__

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

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