I have a problem with my "b" letter in Python shell in OS X. I can't type "b", but "B" worked fine.
How can I solve this issue?
|show 3 more comments|
This question came from our site for professional and enthusiast programmers.
I have the same issue. This happens when you use the MacPorts version of Python in Snow Leopard.
I don't see this issue in Apple's Python that comes with Mac OS X. So, the workaround should be to set
(or a different Python version) and use Apple's Python.
Unfortunately, the workaround is not a wise one.
Apple assumes that its version is unchanged when doing upgrades and other functions. Instead, it is recommended that if you wish to upgrade python or expand it that you install a local version, either under
I also have the same problem, and I do not use the MacPorts version of python.
I am using the latest version of
I installed vpython using their latest binary and using their instructions. It comes with an installer so it is point and click. This is a modified version of Python 2.7.1. It is 32 bit version. (I believe they have not ported it to 64 bits). I then installed VPython-Mac-Py2.7-5.71. I followed this by scipy from www.scipy.org and matplotlib from matplotlib.sourceforge.net All of these installations use an installer.
When I run python off their development tool, idle, or the vpython variant, vidle, I have no problems. If I open a terminal and run python from a bash shell, the shell will not recognize the "b" key in the keyboard. It will give you a 'bell' sound, instead of typing the 'character b'. However, you can enter the letter 'B'. Looks like this key is mapped to some incorrect non-displayed 'character', possibly the 'bell' character in old ASCII code.
I tried changing the emulation to xterm, vt100, vt102. I also played with different encoding schemes like just using UTF-8. I also pressed different combination of special keys like command-b etc. Nothing worked.
My only workaround is to write scripts off idle or vidle.
I hope this helps clarify the problem.
The problematic line in your
First, this did not happen until I updated python 2.7.1 to 2.7.3. That said, the fix is on the line:
The full code in my ~/.pythonrc