Weird Python startup behavior between different drives on PowerPC platform

jwahlmann at gmail.com jwahlmann at gmail.com
Fri Jul 18 14:43:26 EDT 2008


I'm experiencing some strange behavior when starting up python on a
Debian-based PowerPC platform.  Normally, I operate from this platform
with a root file system on an IDE flash drive (/dev/hda1).  However,
I'm trying to get my system to run with root on a mechanical SATA
drive (/dev/sda1).  Both are installed on a PowerPC board via a PMC
daughter board.

When running off the flash drive, the Python interpreter loads and
runs just fine.  However, when running from SATA, the interpreter
seems to have problems with importing things like site, os, etc.  I've
played around with PYTHONHOME to no effect.  I even went as far as
setting PYTHONHOME to some off the wall location (so no stdlibs will
load) and invoking Python as:

host$ PYTHONHOME=/tmp python -d -v -S
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
Python 2.4.4 (#2, Apr  5 2007, 19:01:44)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
>>> i=0
  File "<stdin>", line 1
    i=0
     ^
SyntaxError: invalid syntax
>>>

You'll note that doing something as simple as setting "i=0" results in
a syntax error.  If I run the same thing on the IDE flash drive, it
works:

host$ PYTHONHOME=/tmp python -d -v -S
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
Python 2.4.4 (#2, Apr  5 2007, 19:01:44)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
>>> i=0
>>>

Any ideas?!  What could possibly cause a difference of operation
between running from a IDE flash drive (/dev/hda1) vs. SATA (/dev/
sda1)?  Other than toggling hda1 vs. sda1 in /etc/fstab, the
filesystems are being built identically.  Could it be that shared
libraries aren't being loaded correctly or fast enough off the SATA
drive vs. flash?  Shooting in the dark here...

Thanks,
Jon Wahlmann



More information about the Python-list mailing list