Problem with "raw_input" built-in function in Boa Contructor Shell

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JerryKreps
    New Member
    • Sep 2005
    • 3

    #1

    Problem with "raw_input" built-in function in Boa Contructor Shell

    Hi, folks --

    I'm a Python pup.

    As you can see from the session copied at the end of this post, I have the latest version of Python, and I've been using the Editor-Shell of the latest version of Boa Constructor while going through some Python tutorials.

    Everything was working as expected until I started using the raw_input built-in function.

    There seems to be some unreliable behavior in Boa Constructor's Editor - Shell. If you look at the session copied below, you see that the input accepted by the raw-input function has the first four bytes dropped before it is stored in the test_string.

    The problem can be inconsistant. On rare occasions, it works fine. But a vast majority of the time, it drops the first four characters. Ironically, the Idle IDE shell does not exhibit this problem, so it makes me think that perhaps this could be a Boa bug.

    Any ideas, oh Knights Who Say Ni??

    Thanks! :)
    -- Jerry Kreps

    +++++++++++++++ +++++++++++++++ +++++++++++++++ +++++

    # Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]
    # wxPython 2.6.1.0, Boa Constructor 0.4.4
    # Type "copyright" , "credits" or "license" for more information.


    >>> test_string_01 = raw_input("What is your name?")
    What is your name?
    <<<
    Sir Lancelot
    >>> print test_string_01
    Lancelot


    >>> test_string_02 = raw_input("What is your quest? ")
    What is your quest?
    <<<
    To seek the grail
    >>> print test_string_02
    eek the grail


    >>> test_string_03 = raw_input("What is your favorite color?")
    What is your favorite color?
    <<<
    Orange
    >>> print test_string_03
    ge


    >>> test_string_04 = raw_input("Why are the first four characters dropped? ")
    Why are the first four characters dropped?
    <<<
    Run away!!!
    >>> print test_string_04
    away!!!
    >>>

    +++++++++++++++ +++++++++++++++ ++++++++++++++
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    Originally posted by JerryKreps
    Hi, folks --

    I'm a Python pup.

    As you can see from the session copied at the end of this post, I have the latest version of Python, and I've been using the Editor-Shell of the latest version of Boa Constructor while going through some Python tutorials.

    Everything was working as expected until I started using the raw_input built-in function.

    There seems to be some unreliable behavior in Boa Constructor's Editor - Shell. If you look at the session copied below, you see that the input accepted by the raw-input function has the first four bytes dropped before it is stored in the test_string.

    The problem can be inconsistant. On rare occasions, it works fine. But a vast majority of the time, it drops the first four characters. Ironically, the Idle IDE shell does not exhibit this problem, so it makes me think that perhaps this could be a Boa bug.

    Any ideas, oh Knights Who Say Ni??

    Thanks! :)
    -- Jerry Kreps

    +++++++++++++++ +++++++++++++++ +++++++++++++++ +++++

    # Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]
    # wxPython 2.6.1.0, Boa Constructor 0.4.4
    # Type "copyright" , "credits" or "license" for more information.


    >>> test_string_01 = raw_input("What is your name?")
    What is your name?
    <<<
    Sir Lancelot
    >>> print test_string_01
    Lancelot


    >>> test_string_02 = raw_input("What is your quest? ")
    What is your quest?
    <<<
    To seek the grail
    >>> print test_string_02
    eek the grail


    >>> test_string_03 = raw_input("What is your favorite color?")
    What is your favorite color?
    <<<
    Orange
    >>> print test_string_03
    ge


    >>> test_string_04 = raw_input("Why are the first four characters dropped? ")
    Why are the first four characters dropped?
    <<<
    Run away!!!
    >>> print test_string_04
    away!!!
    >>>

    +++++++++++++++ +++++++++++++++ ++++++++++++++
    This is very interesting, Jerry. I've seen some problems on Boa's shell like this. I'll have to investigate further.

    Comment

    Working...