Python 2.1.1 ... stupid error in import.c

Armin Steinhoff a-steinhoff at web.de
Fri Aug 24 12:44:33 EDT 2001


Hi,
 to all who are porting 2.1.1 to a UNIX like system.

I'm porting 2.1.1 to QNX6 and got the situation that the module 'os' could not
be be found with 'import os'

After some hacking with DDD .. I found out that the pathes used by the search
algorithm of import.c has nothing to do with the directory structure of the UNIX
distribution of Python 2.1.1 =:-/

I have installed Python in the root directory and set PYTHONHOME/PYTHONPATH to
/Python-2.1.1 -> the path to he library modules is then

                     -> /Python-2.1.1/Lib

The search algorithm of import.c is using the following search path sequence:

  "os.so"   -> I don't know why it should make sense to open
               a shared object with fopen ??
  "osmodule.so"
  "os.py"
  "os.pyc"

  "/Python-2.1.1/os.so" ... os.pyc

  "/Python-2.1.1/lib/python2.1/os.so" ... os.pyc
                ^^^^^^^^^^^^^^^ who got the idea that this is part of the 
                                UNIX distribution ??

 Is the version 2.1.1 released or is it escaped :)

Armin




More information about the Python-list mailing list