apple’s dirty little python secret

Posted by pjjw on July 29, 2008

From man python on OS X 10.5 (and probably before):

INTERACTIVE INPUT EDITING AND HISTORY SUBSTITUTION
       The Python inteterpreter supports editing of the current input line and
       history substitution, similar to facilities found in the Korn shell and
       the  GNU  Bash shell.  However, rather than being implemented using the
       GNU Readline library, this Python interpreter  uses  the BSD  EditLine
       library editline(3) with a GNU Readline emulation layer.


       The  readline  module  provides the access to the EditLine library, but
       there are a few major differences compared to a traditional implementa-
       tion  using  the  Readline  library.   The command language used in the
       preference files is that of EditLine, as described in editrc(5) and not
       that   used  by  the  Readline  library. This  also  means that  the
       parse_and_bind() routines uses EditLine commands.  And  the preference
       file itself is ~/.editrc instead of ~/.inputrc.


       For  example,  the rlcompleter module, which defines a completion func-
       tion for the  readline  modules,  works correctly  with the  EditLine
       libraries, but needs to be initialized somewhat differently:


              import rlcompleter
              import readline
              readline.parse_and_bind ("bind ^I rl_complete")


       For vi mode, one needs:


              readline.parse_and_bind ("bind -v")

Well, that explains why Python doesn’t play nice with my readline stuff.

Mission Accomplished… oh wait

Posted by pjjw on January 21, 2008

I was going to write something here about my successes in integrating Apple wireless products into a pre-existing OpenWRT-based wireless network, but it seems I declared victory a bit too early. I can’t get the thing to form a mesh network with my broadcom-based OpenWRT router. According to the Google, this is a failing on both sides- OpenWRT is currently unable to use WPA2 with WDS, and the AirPort can’t join an exclusively WPA1 WDS network. I could fall back to WEP, as that’d be enough to keep most people off my network, but it’s mostly a joke these days anyhow.

I’ve settled on naming my network “608lovesyou”, changing all my passwords on my machines, and opening up my LAN to the building. Here’s hoping there’s nobody malicious around (ha). Hopefully either Kamikaze will be finished soon or the OpenWRT people will fix the WDS problem (WDS is way out of my depth).

Also, Airtunes is totally rad.

what have i done?

Posted by pjjw on December 31, 2007


No way to deny my nerdiness now.

There is nothing here.

Posted by pjjw on August 16, 2007

Yup, nobody’s home. There should be later, though. Expect semi-interesting ramblings in the future! oh boy!
<3 <3 <3
peter