Weird Python startup behavior between different drives on PowerPCplatform

Discussion in 'Python' started by jwahlmann@gmail.com, Jul 18, 2008.

  1. Guest

    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, 2008
    #1
    1. Advertising

  2. Guest

    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, 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, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VEo=?=
    Replies:
    0
    Views:
    372
    =?Utf-8?B?VEo=?=
    Oct 5, 2004
  2. =?Utf-8?B?UHJhZGVlcCBTdW5kYXJhbShNU0ZUKQ==?=

    Enumerate all the drives including Mapped network drives on a serv

    =?Utf-8?B?UHJhZGVlcCBTdW5kYXJhbShNU0ZUKQ==?=, Feb 25, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,058
    =?Utf-8?B?UHJhZGVlcCBTdW5kYXJhbShNU0ZUKQ==?=
    Feb 26, 2005
  3. TS
    Replies:
    1
    Views:
    300
    Kevin Yu [MSFT]
    Jan 25, 2006
  4. Johnny Ruin
    Replies:
    5
    Views:
    516
  5. bluebaron
    Replies:
    3
    Views:
    783
    Jonathan N. Little
    Nov 4, 2009
Loading...

Share This Page