473,395 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Weird Python startup behavior between different drives on PowerPCplatform

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
1 1344
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: newgene | last post by:
Hi, group, A weird clipboard behavior for your help: ==============Code============== from Tkinter import * import tkMessageBox root=Tk() root.withdraw() root.clipboard_clear()
5
by: python newbie | last post by:
hey, okay, I'm trying to figure out why my books: Quick Python, Python in a Nutshell, Python Cookbook and Learning Python don't say anything about the weird behavior of a list when you have one as...
0
by: python-help-bounces | last post by:
Your message for python-help@python.org, the Python programming language assistance line, has been received and is being delivered. This automated response is sent to those of you new to...
9
by: Mayer | last post by:
Hello: I'm running python under cygwin and need to find the drive letter. Cygwin has a way of calling my drives by a name relative to the Cygwin directory, so I get things like /home/user rather...
5
by: Pupeno | last post by:
Hello, I am experiencing a weird behavior that is driving me crazy. I have module called Sensors containing, among other things: class Manager: def getStatus(self): print "getStatus(self=%s)"...
10
by: Pekka Laukkanen | last post by:
Hello, just noticed this: Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) on darwin Type "help", "copyright", "credits" or "license" for more information. {1: 2} {True: False} {1: False}
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.