-   Linux - General (
-   -   how to configure keyboard in python command prompt (

varun_shrivastava 05-30-2007 02:45 AM

how to configure keyboard in python command prompt
i can't use 'del' 'arrow keys' while inside python

it displays some mess

>>> ^[[A^[[C^[[B^[[B^[[A^[[D^[[B^[[A

csinclair 05-31-2007 01:20 PM

readline support in python

Sounds like no readline support in python, which O/S version are you using? I've heard of readline support not being enabled within certain builds of python (Solaris).

Try this, start python from the command line..


># python
>>> import readline

If it throws an error message or complains, you may have an incomplete installation of python, it may be best to rebuild python again to enable readline support.

Hope that helps,

varun_shrivastava 05-31-2007 11:38 PM

yes it displays error message


>>> import readline
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named readline

but i installed python from the source code available at
do i need something else to check or can the module be installed independently

one more question "import gtk" also displays error message
i downloaded the module and tried to install it but displays error message


checking for a Python interpreter with version >= 2.3.5... none
configure: error: no suitable Python interpreter found

thanks for your help

All times are GMT -5. The time now is 11:42 AM.