Linebreak problem on the interactive interpreter Win2k

Discussion in 'Python' started by Jonas Galvez, Feb 20, 2004.

  1. Jonas Galvez

    Jonas Galvez Guest

    A few days ago I posted about a problem I was having on Win2k,
    regarding a SyntaxError error on the interactive interpreter to
    anything I typed. The thread is located here: tinyurl.com/2kk7b

    I've mode some progress on this. I noticed that the problem in
    fact lies on the line break. If I place a # on the end of the line,
    Python has no problem interpreting it:

    C:\>python
    Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> print "This works" #

    This works
    >>>


    However:

    >>> print "This doesn't work"

    File "<stdin>", line 1
    print "This doesn't work"
    ^
    SyntaxError: invalid syntax
    >>>


    The problem is that Python is not interpreting "\r\n" correctly:

    >>> import sys; sys.last_value.text #

    'print "This doesn\'t work"\r\n'
    >>>


    Can I change this anyhow?


    Jonas
     
    Jonas Galvez, Feb 20, 2004
    #1
    1. Advertisements

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. WJ
    Replies:
    2
    Views:
    728
  2. Dave Reed
    Replies:
    2
    Views:
    392
    Dave Kuhlman
    Oct 12, 2003
  3. Jonas Galvez

    Interactive interpreter problem

    Jonas Galvez, Feb 17, 2004, in forum: Python
    Replies:
    0
    Views:
    350
    Jonas Galvez
    Feb 17, 2004
  4. Gabriel Cooper
    Replies:
    1
    Views:
    1,192
    vincent wehren
    Apr 27, 2004
  5. Miki Tebeka
    Replies:
    2
    Views:
    418
    Fuzzyman
    Feb 1, 2005
  6. Replies:
    5
    Views:
    295
  7. Simon Eves
    Replies:
    0
    Views:
    462
    Simon Eves
    Dec 16, 2006
  8. Replies:
    3
    Views:
    346
    Gunnar Hjalmarsson
    May 24, 2006
Loading...