Macports and python 2.5
April 2017
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
About
This site is an effort to share some of the base knowledge I have gathered through all this years working with Linux, FreeBSD, OpenBSD, Python or Zope, among others. So, take a look around and I hope you will find the contents useful.
Recent Entries
Recent Comments
Recent Trackbacks
Categories
OpenBSD (9 items)
BSD (0 items)
FreeBSD (19 items)
Linux (3 items)
Security (3 items)
Python (22 items)
Zope (13 items)
Daily (144 items)
e-shell (9 items)
Hacks (14 items)
PostgreSQL (3 items)
OSX (8 items)
Nintendo DS (0 items)
enlightenment (0 items)
Apache (3 items)
Nintendo Wii (1 items)
Django (24 items)
Music (12 items)
Plone (7 items)
Varnish (0 items)
Lugo (2 items)
Sendmail (0 items)
europython (7 items)
Cherokee (1 items)
self (1 items)
Nature (1 items)
Hiking (0 items)
uwsgi (0 items)
nginx (0 items)
cycling (8 items)
Networking (1 items)
DNS (0 items)
Archives

Syndicate this site (XML)

RSS/RDF 0.91

29 abril
2008

Macports and python 2.5

or how you can get yourself mad if you do not read this one...

Some weeks ago I upgraded my macbook from Tiger to Leopard. Right after the upgrade, I installed the usual tools I need for work, like Python, using MacPorts.

Everything was ok, but one thing keeps annoying me all this time... until some minutes ago.

When using the python console, I got a weird behaviour when trying to get entries from the console buffer, and things like that. Let's see it with an example:

snowball:~ wu$ python
Python 2.5.2 (r252:60911, Apr 29 2008, 23:50:14)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> ^[[A

That's what I got when pressing up to access the import os command I just executed before. Some other things didn't work as expected, like pressing the tab key for indentation... pretty annoying.

It didn't help that it only happened with the 2.5 version of the interpreter, python 2.4 worked fine.

Just a while ago, I find the solution for that little problem, installing the py25-readline package:

snowball:~ wu$ sudo port -v install py25-readline

Seems like the people behind MacPorts separate some python 2.5 components into separate subpackages (that's why python2.4 didn't have such problem).

After installed that package, I can enjoy the interpreter experience as usual:

snowball:~ wu$ python
Python 2.5.2 (r252:60911, Apr 29 2008, 23:50:14)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import os

(the second import os appeared when pressing up to access the buffer contents).

Posted by wu at 23:20 | Comments (0) | Trackbacks (0)
<< FC Barcelona vs Manchester United | Main | Using Expect with sieveshell... >>
Comments
There are no comments.
Trackbacks
Please send trackback to:http://blog.e-shell.org/63/tbping
There are no trackbacks.
Post a comment