By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,196 Members | 1,682 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,196 IT Pros & Developers. It's quick & easy.

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

P: 3
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!!!
>>>

++++++++++++++++++++++++++++++++++++++++++++
Sep 29 '05 #1
Share this Question
Share on Google+
1 Reply


bartonc
Expert 5K+
P: 6,596
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.
Mar 10 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.