Re: [Pythonmac-SIG] [IPython-dev] readline support for OS X Leopard

2007-10-31 Thread Boyd Waters
The segfault was in binding to the "complete" command; it does not segfault (and seems to work) if I bind to "rl_complete" instead. *However*, I am not sure that this is what IPython wants. I am going to assume that rl_complete is the correct thing (at the moment) and that IPython maps the app

Re: [Pythonmac-SIG] [IPython-dev] readline support for OS X Leopard

2007-10-31 Thread Boyd Waters
The segfault was in binding to the "complete" command; it does not segfault (and seems to work) if I bind to "rl_complete" instead. *However*, I am not sure that this is what IPython wants. I am going to assume that rl_complete is the correct thing (at the moment) and that IPython maps the app

Re: [Pythonmac-SIG] [IPython-dev] readline support for OS X Leopard

2007-10-31 Thread Boyd Waters
This "which python" is an important point, but it is NOT causing my segfault. I'm using Apple's Python. I'm certain. For IPython. If you add this code to iplib.py then you are able to determine if you are bound to libedit. have_libedit - False if sys.platform == 'darwin' and have_readline:

Re: [Pythonmac-SIG] [IPython-dev] readline support for OS X Leopard

2007-10-30 Thread Boyd Waters
On Oct 30, 2007, at 6:16 PM, Robert Kern wrote: > I meant that trying that with a readline module > compiled against GNU readline interferes with typing "b". So, > unfortunately, you > can't just issue both commands hoping that the library will just > ignore the > wrong one. I'm not sure I

Re: [Pythonmac-SIG] [IPython-dev] readline support for OS X Leopard

2007-10-30 Thread Boyd Waters
On Oct 30, 2007, at 4:41 PM, Hans Meine wrote: > What about multiple pythons/readlines? I happend to look over the > shoulder of > an OS X user yesterday, who had three versions of python installed > on his > system. (I would not suggest that this is a good idea, but AFAICS > it happens >

Re: [Pythonmac-SIG] [IPython-dev] readline support for OS X Leopard

2007-10-30 Thread Michael VanLandingham
Well one way to do this, although perhaps crude, would be to check to see if the libreadline is really a link to editline, since on a default Leopard install, it is: [mvl ~]$ ls -l /usr/lib/libreadline.dylib lrwxr-xr-x 1 root wheel 15 Oct 17 15:59 /usr/lib/libreadline.dylib@ -> libedit.2

Re: [Pythonmac-SIG] [IPython-dev] readline support for OS X Leopard

2007-10-30 Thread Brian Granger
I am afraid that this patch won't cut it. It does a simple test of the os type. The problem is that someone could install a version of python on OS X and want to use the other readline library (for example the OS X python binaries from the python.org website ship with this readline). Somehow, we

Re: [Pythonmac-SIG] [IPython-dev] readline support for OS X Leopard

2007-10-29 Thread Michael Vanlandingham
FWIW, this patch works for me. I'm on IPython 0.8.2.svn.r2841. This was driving me nuts for some time -- after all, the _Ruby_ shell (irb) had tab-completion in Leopard, so why shouldn't Python/ iPython? I hadn't found the time to figure out a solution, so hooray for user communities. I s

Re: [Pythonmac-SIG] [IPython-dev] readline support for OS X Leopard

2007-10-27 Thread Fernando Perez
On 10/27/07, Boyd Waters <[EMAIL PROTECTED]> wrote: > OK, thanks... I'll try to put something in ipy_defaults.py > > I'm trying to come up to speed on the new style configuration. I'll > try looking through Trac for more info as well. Honestly, this is so important that I'd rather have it in the c

Re: [Pythonmac-SIG] [IPython-dev] readline support for OS X Leopard

2007-10-27 Thread Ville M. Vainio
On 10/27/07, Boyd Waters <[EMAIL PROTECTED]> wrote: > Stay tuned for a patch! > > something like > if 'darwin' in os.platform: Where do you plan to put this? Configuring readline is done in config files (ipythonrc), which don't really allow conditional actions. I suggest you put it in ipy_defa

Re: [Pythonmac-SIG] [IPython-dev] readline support for OS X Leopard

2007-10-27 Thread Boyd Waters
OK, thanks... I'll try to put something in ipy_defaults.py I'm trying to come up to speed on the new style configuration. I'll try looking through Trac for more info as well. On Oct 27, 2007, at 2:37 AM, Ville M. Vainio wrote: > I suggest you put it in ipy_defaults.py, and we'll advise leop