I run OpenElec on a Pi. I can ssh to the Pi and open a python shell.
How do I enable the cursor keys to work like up getting to last command in the python shell, like it does on my Ubuntu box.
Now the cursor key up just shows:
>>> ^[[A
I run OpenElec on a Pi. I can ssh to the Pi and open a python shell.
How do I enable the cursor keys to work like up getting to last command in the python shell, like it does on my Ubuntu box.
Now the cursor key up just shows:
>>> ^[[A
OpenElec compiles Python with readline support disabled. Readline is the line edition library that the interactive Python interpreter uses, so without it, cursor keys won't work.
The readline library is present on the system, so you can compile rlwrap (a small wrapper that provides readline command line edition to any command) and run rlwrap python. You'll need to install compilation tools on our Ubuntu PC, then download the source of rlwrap and compile it. Alternatively there may be a suitable ARM binary of rlwrap somwehere.
You can also install rlwrap on your PC and run rlwrap ssh pi python.