By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,958 Members | 1,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,958 IT Pros & Developers. It's quick & easy.

Weird Python startup behavior between different drives on PowerPCplatform

P: n/a
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
Jul 18 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Bump. Anyone have any ideas on this? My next step is to either link
together a static version of the compiler or create a debug version.

Thanks,
Jon

On Jul 18, 11:43 am, jwahlm...@gmail.com wrote:
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
Jul 21 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.