Updated now can't scroll uparrow

C

Chris Rebert

I updated Python to 3.1.3 on Mac OSX. Now suddenly in the Interactive
interpreter I get all this instead of scrolling the history:

What's wrong and how to fix it?

Looks like GNU readline support wasn't enabled in the build you
installed. How did you install your Python?

Cheers,
Chris
 
G

Gnarlodious

Like so:

../configure MACOSX_DEPLOYMENT_TARGET=10.6 \
--enable-framework=/usr/local/python-3.1/frameworks \
--prefix=/usr/local/python-3.1 \
--enable-universalsdk=/ \
--with-universal-archs=intel

Is there some directive to enable Readline?

-- Gnarlie
http://Gnarlodious.com
 
N

Ned Deily

Gnarlodious said:
Like so:

./configure MACOSX_DEPLOYMENT_TARGET=10.6 \
--enable-framework=/usr/local/python-3.1/frameworks \
--prefix=/usr/local/python-3.1 \
--enable-universalsdk=/ \
--with-universal-archs=intel

Is there some directive to enable Readline?

You need to supply your own copy of GNU readline; Apple does not ship
it. You can use one from MacPorts or other 3rd-party distributor.
Python 2.7 and 3.2 have a feature to use the readline compatibility
interface of BSD editline (libedit) which Apple does ship but that
feature was not backported to Python 3.1. The python.org 3.1.x
installers are built with GNU readline (and there is one for 3.1.4rc1).
 
G

Gnarlodious

After copious headscratching I took Ned's advice and went for 3.2
which includes built-in interactive arrow key support. To any Mac OSX
readers, save yourself the trouble and don't even try Python 3.1.3.

-- Gnarlie
http://Gnarlodious.com
 
N

Ned Deily

After copious headscratching I took Ned's advice and went for 3.2
which includes built-in interactive arrow key support. To any Mac OSX
readers, save yourself the trouble and don't even try Python 3.1.3.

Or use a binary installer (like those provided by python.org) or a
third-party package distributor (like MacPorts or Homebrew) that has
done the hard work for you. That said, you should find many
improvements in 3.2.x over 3.1.x. 3.2.1rc1 ("rc" == "release
candidate") is available now and an rc2 should be available in the very
near future. If you have to stick with 3.1 for some reason, there's
also a 3.1.4rc1 available now. And a 2.7.2rc1. All available with
source, Windows installers, and Mac OS X installers.

http://www.python.org/download/releases/3.2.1/
http://www.python.org/download/releases/3.1.4/
http://www.python.org/download/releases/2.7.2/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,161
Messages
2,570,892
Members
47,426
Latest member
MrMet

Latest Threads

Top