Python shell on mac os x

B

Bert Heymans

Hi!

I'm using iTerm on the mac the keymapping isn't right. On Linux and
Windows it's really nice to be able to hit up to get the previous
command. Does anyone know a way to get the Pyhton shell to work like

I've been looking for the correct mappings but can't find a proper
reference online nor what the Python shell expects. Any help would be
greatly appreciated! Hints/suggestions on keywords to use in a search
on Google are always welcome :) I don't know where to begin looking
for this kind of information.

kind regards,

- Bert Heymans
 
A

Alex Martelli

Bert Heymans said:
Hi!

I'm using iTerm on the mac the keymapping isn't right. On Linux and
Windows it's really nice to be able to hit up to get the previous
command. Does anyone know a way to get the Pyhton shell to work like

I've been looking for the correct mappings but can't find a proper
reference online nor what the Python shell expects. Any help would be
greatly appreciated! Hints/suggestions on keywords to use in a search
on Google are always welcome :) I don't know where to begin looking
for this kind of information.

The Python 2.3.5 bundled with MacOSX doesn't come with readline.
Download 2.5 (or if you must 2.4) for the Mac from www.python.org and
live happily ever after.

E.g. (I'm hitting an up-arrow the 2nd time, then control-D next time):

brain:~ alex$ python2.3
Python 2.3.5 (#1, Jan 13 2006, 20:13:11)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
File "<stdin>", line 1
^
SyntaxError: invalid syntaxbrain:~ alex$ python2.4
Python 2.4.3 (#1, Apr 7 2006, 10:54:33)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.brain:~ alex$


Alex
 
B

Bert Heymans

Bert Heymans said:
I'm using iTerm on the mac the keymapping isn't right. On Linux and
Windows it's really nice to be able to hit up to get the previous
command. Does anyone know a way to get the Pyhton shell to work like
on other systems, I always get this when I hit the direction keys:

I've been looking for the correct mappings but can't find a proper
reference online nor what the Python shell expects. Any help would be
greatly appreciated! Hints/suggestions on keywords to use in a search
on Google are always welcome :) I don't know where to begin looking
for this kind of information.

The Python 2.3.5 bundled with MacOSX doesn't come with readline.
Download 2.5 (or if you must 2.4) for the Mac fromwww.python.organd
live happily ever after.

E.g. (I'm hitting an up-arrow the 2nd time, then control-D next time):

brain:~ alex$ python2.3
Python 2.3.5 (#1, Jan 13 2006, 20:13:11)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.>>> 2+2
4

File "<stdin>", line 1
^
SyntaxError: invalid syntax>>> ^D

brain:~ alex$ python2.4
Python 2.4.3 (#1, Apr 7 2006, 10:54:33)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.>>> 2+2
44

brain:~ alex$

Alex

Wow, thanks for pointing that out Alex! I wasn't even hoping a
solution could be that simple :s
 
7

7stud

or go tohttp://pythonmac.org/packages/
and you have python 2.5 or python 2.4.4 with readline support

The download instructions seem to steer Mac users to version 2.4.4
because it has more modules available. What is the consensus on that?
 
K

Kevin Walzer

7stud said:
The download instructions seem to steer Mac users to version 2.4.4
because it has more modules available. What is the consensus on that?

If you just want binary packages installed, it might make sense to use
2.4.4, but building new packages with 2.5 is easy: either use
easy_install or sudo python setup.py. I've had no trouble building the
stuff I need with 2.5.
 
L

Lou Pecora

Kevin Walzer said:
If you just want binary packages installed, it might make sense to use
2.4.4, but building new packages with 2.5 is easy: either use
easy_install or sudo python setup.py. I've had no trouble building the
stuff I need with 2.5.

And what is the stuff you need? So we can see what definitely works.
Thanks.

-- Lou Pecora (my views are my own) REMOVE THIS to email me.
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top