invalid syntax - problems with CR (0x0a)

Discussion in 'Python' started by cesare, Mar 31, 2006.

  1. cesare

    cesare Guest

    hi,
    i'm very new to python and am experiencing the following problem:

    an identical program that runs on certain computers crashes on other
    machines due to Carriage Returns (CR; 0x0a) that
    now appear in the source code. I guess it's some kind of character encoding
    issue, i.e. ways of saving the source files...
    I spent a lot of time trying to fix the problem but wasn't successful until
    now.

    Can somebody help me?

    Cheers,
    Cesare


    error message inside the log file:

    Traceback (most recent call last):
    File
    "S:\P037_Gewerbeverband\Programm\Testumgebung\meta_search_download_scheduler.py",
    line 132, in instanceMP
    exec 'import %s' % mp
    File "<string>", line 1, in ?
    File "S:\P037_Gewerbeverband\Programm\Testumgebung\weisseseiten.py", line
    87
    s = s.replace('.-', ' CHF')
    s = s.replace(';', ' ')
    ^
    SyntaxError: invalid syntax



    ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    cesare, Mar 31, 2006
    #1
    1. Advertising

  2. On Fri, 31 Mar 2006 14:42:38 +0200, "cesare" <>
    declaimed the following in comp.lang.python:


    > s = s.replace('.-', ' CHF')
    > s = s.replace(';', ' ')
    >

    ^ mismatched indentation
    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Home Page: <http://www.dm.net/~wulfraed/> <
    > Overflow Page: <http://wlfraed.home.netcom.com/> <
     
    Dennis Lee Bieber, Mar 31, 2006
    #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. Jean-Gael GRICOURT

    Tricky cout with 0x0A value

    Jean-Gael GRICOURT, Feb 1, 2004, in forum: C++
    Replies:
    6
    Views:
    3,092
    Jean-Gael GRICOURT
    Feb 2, 2004
  2. Patrick.O.Ige
    Replies:
    1
    Views:
    2,014
    Patrick.O.Ige
    Jul 2, 2006
  3. Java Guy
    Replies:
    1
    Views:
    709
    Manish Pandit
    Oct 15, 2006
  4. Replies:
    15
    Views:
    1,135
    Keith Thompson
    Mar 14, 2006
  5. Vivienne
    Replies:
    3
    Views:
    475
    Vivienne
    Jan 15, 2007
Loading...

Share This Page