From rgjames at ucdavis.edu Tue Oct 9 18:08:02 2007 From: rgjames at ucdavis.edu (Ryan James) Date: Tue, 09 Oct 2007 15:08:02 -0700 Subject: [IPython-dev] website spam Message-ID: <1191967682.5863.1.camel@localhost.localdomain> sorry if this is the wrong list. the wiki is getting way too much spam lately. would it be possible to setup a spam filter of some sort to at least reduce the levels? -ryan From fperez.net at gmail.com Wed Oct 10 17:04:06 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Wed, 10 Oct 2007 15:04:06 -0600 Subject: [IPython-dev] website spam In-Reply-To: <1191967682.5863.1.camel@localhost.localdomain> References: <1191967682.5863.1.camel@localhost.localdomain> Message-ID: On 10/9/07, Ryan James wrote: > sorry if this is the wrong list. > > the wiki is getting way too much spam lately. would it be possible to > setup a spam filter of some sort to at least reduce the levels? Oh god, I just saw how much cleanup you've done. First, many, many thanks for this! I'll get on a more realistic solution for the long term right away, even if it means banning open edits of the wiki and having to request a registered ID on the list from me. I really appreciate you keeping an eye on this, but we'll find something that's tenable in the long run. Cheers, f From vivainio at gmail.com Thu Oct 11 05:21:35 2007 From: vivainio at gmail.com (Ville M. Vainio) Date: Thu, 11 Oct 2007 12:21:35 +0300 Subject: [IPython-dev] website spam In-Reply-To: References: <1191967682.5863.1.camel@localhost.localdomain> Message-ID: <46cb515a0710110221v35357a3bt57ec07a56313bdb2@mail.gmail.com> On 10/11/07, Fernando Perez wrote: > I'll get on a more realistic solution for the long term right away, > even if it means banning open edits of the wiki and having to request > a registered ID on the list from me. Or just some script somewhere. Unrelated: I have one more week to go before I can access internet at home again, so I figure after that we could finally push for the release? -- Ville M. Vainio - vivainio.googlepages.com blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio' From fperez.net at gmail.com Thu Oct 11 13:36:24 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Thu, 11 Oct 2007 11:36:24 -0600 Subject: [IPython-dev] website spam In-Reply-To: <46cb515a0710110221v35357a3bt57ec07a56313bdb2@mail.gmail.com> References: <1191967682.5863.1.camel@localhost.localdomain> <46cb515a0710110221v35357a3bt57ec07a56313bdb2@mail.gmail.com> Message-ID: On 10/11/07, Ville M. Vainio wrote: > On 10/11/07, Fernando Perez wrote: > > > I'll get on a more realistic solution for the long term right away, > > even if it means banning open edits of the wiki and having to request > > a registered ID on the list from me. > > Or just some script somewhere. If you have a good/easy one, send it my way. Initially I'll just close the thing off for now, but I'd obviously love a less blunt solution, so any contributions are *very* welcome. > Unrelated: I have one more week to go before I can access internet at > home again, so I figure after that we could finally push for the > release? Yup. I'll be traveling for the next 2 weeks, but with on and off net access, so it shouldn't be a problem. I am worried though about all those unicode problems we still have. Though perhaps we should just push out the current code as is, and leave that for post 0.8.2. I'll leave that decision for you to make, I'm OK either way (though I'd vote for releasing sooner). Cheers, f From vivainio at gmail.com Fri Oct 12 03:12:24 2007 From: vivainio at gmail.com (Ville M. Vainio) Date: Fri, 12 Oct 2007 10:12:24 +0300 Subject: [IPython-dev] website spam In-Reply-To: References: <1191967682.5863.1.camel@localhost.localdomain> <46cb515a0710110221v35357a3bt57ec07a56313bdb2@mail.gmail.com> Message-ID: <46cb515a0710120012n61af171ew23cd43c400defec1@mail.gmail.com> On 10/11/07, Fernando Perez wrote: > Yup. I'll be traveling for the next 2 weeks, but with on and off net > access, so it shouldn't be a problem. I am worried though about all > those unicode problems we still have. Though perhaps we should just > push out the current code as is, and leave that for post 0.8.2. I'll > leave that decision for you to make, I'm OK either way (though I'd > vote for releasing sooner). Yes, the unicode problems are not specific to 0.8.2 version of IPython, and fixing them will inevitably cause more problems. Unicode stuff is just too drastic this late in the release schedule. Let's just get a release out after your travels - I have some small fixes to put in before that. -- Ville M. Vainio - vivainio.googlepages.com blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio' From fperez.net at gmail.com Fri Oct 12 03:14:26 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 12 Oct 2007 01:14:26 -0600 Subject: [IPython-dev] Wiki being spammed to death, new user creation blocked Message-ID: Hi all, due to the recent spam flood on our wiki, I've just completely disabled new account creation. It's unfortunate, but the Moin installation already had all the countermeasures available for Moin installed (I consulted the Enthought admin on this) and Ryan James was still having to do enormous amounts of cleanup all the time. While I'm very grateful to Ryan for this help, I'm sure he has better things to do with his time than babysit the site for spam in Chinese. I wrote a small script that permamently disabled every account I found that looked to be spammer-related, so not only will they not be able to create new ones, their old ones have now been locked out. I also deleted all the remaining spam I could find on the site, though by now Ryan had mostly finished that unpleasant task. In the future, if anyone wants to contribute to the wiki, you'll just need to send me an email with a quick request indicating your desired Wiki user name (=(in standard FirstnameLastname Wiki convention). I'll try to be quick in making the accounts. I'm sorry for this, and if anyone knows of a more robust and conveninent solution for the long term, I'm all ears. Cheers, f From fperez.net at gmail.com Fri Oct 12 03:16:04 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 12 Oct 2007 01:16:04 -0600 Subject: [IPython-dev] website spam In-Reply-To: <46cb515a0710120012n61af171ew23cd43c400defec1@mail.gmail.com> References: <1191967682.5863.1.camel@localhost.localdomain> <46cb515a0710110221v35357a3bt57ec07a56313bdb2@mail.gmail.com> <46cb515a0710120012n61af171ew23cd43c400defec1@mail.gmail.com> Message-ID: On 10/12/07, Ville M. Vainio wrote: > On 10/11/07, Fernando Perez wrote: > > > Yup. I'll be traveling for the next 2 weeks, but with on and off net > > access, so it shouldn't be a problem. I am worried though about all > > those unicode problems we still have. Though perhaps we should just > > push out the current code as is, and leave that for post 0.8.2. I'll > > leave that decision for you to make, I'm OK either way (though I'd > > vote for releasing sooner). > > Yes, the unicode problems are not specific to 0.8.2 version of > IPython, and fixing them will inevitably cause more problems. Unicode > stuff is just too drastic this late in the release schedule. > > Let's just get a release out after your travels - I have some small > fixes to put in before that. Sounds good to me. G'night (tired and annoyed from wasting time on this spam mess. I really, really hate those people with a passion...) f From fperez.net at gmail.com Fri Oct 12 03:20:26 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 12 Oct 2007 01:20:26 -0600 Subject: [IPython-dev] A quick question on the spam topic Message-ID: Hi all (but Ryan probably knows best here): I tried to delete some pages using the 'delete page' action on the left, but while I got the message 'page successfully deleted', I can still see them. For example: http://ipython.scipy.org/moin/%E9%A6%96%E9%A1%B5 http://ipython.scipy.org/moin/%E7%BB%B4%E5%9F%BA%E6%B2%99%E7%9B%98%E6%BC%94%E7%BB%83 Any idea of what I'm doing wrong? (go ahead and delete them if you want, btw). Cheers, f From steve at shrogers.com Fri Oct 12 08:26:08 2007 From: steve at shrogers.com (Steven H. Rogers) Date: Fri, 12 Oct 2007 06:26:08 -0600 Subject: [IPython-dev] A quick question on the spam topic In-Reply-To: References: Message-ID: <470F67E0.1070301@shrogers.com> I think that keeping the page name in the index is the standard behavior, but that the actual content is deleted. # Steve Fernando Perez wrote: > Hi all (but Ryan probably knows best here): > > I tried to delete some pages using the 'delete page' action on the > left, but while I got the message 'page successfully deleted', I can > still see them. For example: > > http://ipython.scipy.org/moin/%E9%A6%96%E9%A1%B5 > http://ipython.scipy.org/moin/%E7%BB%B4%E5%9F%BA%E6%B2%99%E7%9B%98%E6%BC%94%E7%BB%83 > > Any idea of what I'm doing wrong? (go ahead and delete them if you want, btw). > > Cheers, > > f > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev > > From robert.kern at gmail.com Fri Oct 12 13:25:37 2007 From: robert.kern at gmail.com (Robert Kern) Date: Fri, 12 Oct 2007 12:25:37 -0500 Subject: [IPython-dev] A quick question on the spam topic In-Reply-To: References: Message-ID: Fernando Perez wrote: > Hi all (but Ryan probably knows best here): > > I tried to delete some pages using the 'delete page' action on the > left, but while I got the message 'page successfully deleted', I can > still see them. For example: > > http://ipython.scipy.org/moin/%E9%A6%96%E9%A1%B5 > http://ipython.scipy.org/moin/%E7%BB%B4%E5%9F%BA%E6%B2%99%E7%9B%98%E6%BC%94%E7%BB%83 > > Any idea of what I'm doing wrong? (go ahead and delete them if you want, btw). They aren't spam. They're the Chinese-localized MoinMoin help pages. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From fperez.net at gmail.com Fri Oct 12 13:45:09 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 12 Oct 2007 11:45:09 -0600 Subject: [IPython-dev] A quick question on the spam topic In-Reply-To: References: Message-ID: On 10/12/07, Robert Kern wrote: > Fernando Perez wrote: > > Hi all (but Ryan probably knows best here): > > > > I tried to delete some pages using the 'delete page' action on the > > left, but while I got the message 'page successfully deleted', I can > > still see them. For example: > > > > http://ipython.scipy.org/moin/%E9%A6%96%E9%A1%B5 > > http://ipython.scipy.org/moin/%E7%BB%B4%E5%9F%BA%E6%B2%99%E7%9B%98%E6%BC%94%E7%BB%83 > > > > Any idea of what I'm doing wrong? (go ahead and delete them if you want, btw). > > They aren't spam. They're the Chinese-localized MoinMoin help pages. Well, I tried to delete those two because they'd seen edits by known spam usernames. So I imagine what happened was that they appended spam content somewhere in there. Seeing how my Chinese is a bit rusty right now, I didn't know what was what and was forced to use a rather blunt instrument. Cheers, f From fperez.net at gmail.com Fri Oct 12 13:46:22 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 12 Oct 2007 11:46:22 -0600 Subject: [IPython-dev] A quick question on the spam topic In-Reply-To: <470F67E0.1070301@shrogers.com> References: <470F67E0.1070301@shrogers.com> Message-ID: On 10/12/07, Steven H. Rogers wrote: > I think that keeping the page name in the index is the standard > behavior, but that the actual content is deleted. The difference is that those deleted by Ryan appeared with a big 'Deleted' red mark on http://ipython.scipy.org/moin/RecentChanges while the two I tried to delete didn't get that mark. But perhaps it's because as Robert indicated, those two are internal to Moin and hence can't really be deleted, I don't know. Cheers, f From fperez.net at gmail.com Mon Oct 15 21:09:27 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Mon, 15 Oct 2007 19:09:27 -0600 Subject: [IPython-dev] Mostly offline for two weeks Message-ID: Hi all, just a note that I'll be mostly offline for two weeks. Not that it matters much, since others do more than me around here, but still :) And things like direct fiddling with the site are still mostly my job, so none of that for a few days. I will have email access, but anyone who needs to contact me should use my 'normal' email address, Fernando.Perez at colorado.edu. This one is the one I use just for mailing lists, and I tend to ignore it when I'm swamped, traveling, or have otherwise limited access. My regular work one I monitor much more closely, so when you actually want to write to me directly, it's best to use that one. Cheers, f From Fernando.Perez at colorado.edu Wed Oct 17 06:22:53 2007 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Wed, 17 Oct 2007 04:22:53 -0600 Subject: [IPython-dev] Fwd: [sage-support] Re: install problem with pickleshare In-Reply-To: <85e81ba30710161612n1f5907dey924e0120a2989639@mail.gmail.com> References: <1192514681.204773.36580@i13g2000prf.googlegroups.com> <85e81ba30710160006m2c2f3ae0g215a1eeae57095ed@mail.gmail.com> <1192548768.188492.94600@v23g2000prn.googlegroups.com> <85e81ba30710161612n1f5907dey924e0120a2989639@mail.gmail.com> Message-ID: <96de71860710170322qbb1bae6yd5fcb905267db4a9@mail.gmail.com> Hey folks, if anyone can help William with this, I'd be very grateful. This doesn't ring any bells in my jet lagged brain and need to run out in a second, so I won't be able to deal with this, likely for a few days. Cheers, f ---------- Forwarded message ---------- From: William Stein Date: Oct 16, 2007 5:12 PM Subject: Fwd: [sage-support] Re: install problem with pickleshare To: Fernando Perez Does this ring any bells to you? ---------- Forwarded message ---------- From: maxj Date: Oct 16, 2007 8:32 AM Subject: [sage-support] Re: install problem with pickleshare To: sage-support On Oct 16, 12:06 am, "William Stein" wrote: > Please post very precise details about your computer, version of OS X, > output of "gcc -v" (from the command line), and the exact error message > when you start Sage. Also, do you have fink installed? ______________________________________ Machine Name: Mac mini Machine Model: PowerMac10,1 CPU Type: PowerPC G4 (1.2) Number Of CPUs: 1 CPU Speed: 1.25 GHz L2 Cache (per CPU): 512 KB Memory: 512 MB System Version: Mac OS X 10.4.10 (8R218) Kernel Version: Darwin 8.10.0 ________________________________ max$ gcc -v Using built-in specs. Target: powerpc-apple-darwin8 Configured with: /private/var/tmp/gcc/gcc-5250.obj~12/src/configure -- disable-checking -enable-werror --prefix=/usr --mandir=/share/man -- enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg] [^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 -- build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 -- target=powerpc-apple-darwin8 Thread model: posix gcc version 4.0.1 (Apple Computer, Inc. build 5250) ________________________________ ---------------------------------------------------------------------- | SAGE Version 2.8.6, Release Date: 2007-10-06 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/max/Desktop/sage-2.8.6-PowerMacintosh-Darwin/local/bin/ sage-ipython", line 10, in import IPython File "/Users/max/Desktop/sage-2.8.6-PowerMacintosh-Darwin/local/lib/ python2.5/site-packages/IPython/__init__.py", line 60, in __import__(name,glob,loc,[]) File "/Users/max/Desktop/sage-2.8.6-PowerMacintosh-Darwin/local/lib/ python2.5/site-packages/IPython/Shell.py", line 44, in from IPython.iplib import InteractiveShell File "/Users/max/Desktop/sage-2.8.6-PowerMacintosh-Darwin/local/lib/ python2.5/site-packages/IPython/iplib.py", line 58, in import pickleshare ImportError: No module named pickleshare ______________________________ Yes, I have Fink 0.24.14 installed. Thanks, Max --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support at googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscribe at googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~--- -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org From ellisonbg.net at gmail.com Wed Oct 17 23:18:57 2007 From: ellisonbg.net at gmail.com (Brian Granger) Date: Wed, 17 Oct 2007 21:18:57 -0600 Subject: [IPython-dev] Fwd: [sage-support] Re: install problem with pickleshare In-Reply-To: <96de71860710170322qbb1bae6yd5fcb905267db4a9@mail.gmail.com> References: <1192514681.204773.36580@i13g2000prf.googlegroups.com> <85e81ba30710160006m2c2f3ae0g215a1eeae57095ed@mail.gmail.com> <1192548768.188492.94600@v23g2000prn.googlegroups.com> <85e81ba30710161612n1f5907dey924e0120a2989639@mail.gmail.com> <96de71860710170322qbb1bae6yd5fcb905267db4a9@mail.gmail.com> Message-ID: <6ce0ac130710172018j5417d295t312d8459915df80@mail.gmail.com> This is really odd. pickleshare.py is in the Extensions subfolder of IPython, and thus iplib.py shouldn't be able to import it. This is exactly what William is seeing.....but, this code has been in ipython for a while (my own running version has it), but it is not causing a problem. Ville knows most about this module, any thoughts? Brian On 10/17/07, Fernando Perez wrote: > Hey folks, > > if anyone can help William with this, I'd be very grateful. This > doesn't ring any bells in my jet lagged brain and need to run out in a > second, so I won't be able to deal with this, likely for a few days. > > Cheers, > > f > > ---------- Forwarded message ---------- > From: William Stein > Date: Oct 16, 2007 5:12 PM > Subject: Fwd: [sage-support] Re: install problem with pickleshare > To: Fernando Perez > > > Does this ring any bells to you? > > ---------- Forwarded message ---------- > From: maxj > Date: Oct 16, 2007 8:32 AM > Subject: [sage-support] Re: install problem with pickleshare > To: sage-support > > > > On Oct 16, 12:06 am, "William Stein" wrote: > > > Please post very precise details about your computer, version of OS X, > > output of "gcc -v" (from the command line), and the exact error message > > when you start Sage. Also, do you have fink installed? > ______________________________________ > > Machine Name: Mac mini > Machine Model: PowerMac10,1 > CPU Type: PowerPC G4 (1.2) > Number Of CPUs: 1 > CPU Speed: 1.25 GHz > L2 Cache (per CPU): 512 KB > Memory: 512 MB > System Version: Mac OS X 10.4.10 (8R218) > Kernel Version: Darwin 8.10.0 > ________________________________ > > max$ gcc -v > Using built-in specs. > Target: powerpc-apple-darwin8 > Configured with: /private/var/tmp/gcc/gcc-5250.obj~12/src/configure -- > disable-checking -enable-werror --prefix=/usr --mandir=/share/man -- > enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg] > [^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 -- > build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 -- > target=powerpc-apple-darwin8 > Thread model: posix > gcc version 4.0.1 (Apple Computer, Inc. build 5250) > ________________________________ > > ---------------------------------------------------------------------- > | SAGE Version 2.8.6, Release Date: 2007-10-06 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/max/Desktop/sage-2.8.6-PowerMacintosh-Darwin/local/bin/ > sage-ipython", line 10, in > import IPython > File "/Users/max/Desktop/sage-2.8.6-PowerMacintosh-Darwin/local/lib/ > python2.5/site-packages/IPython/__init__.py", line 60, in > __import__(name,glob,loc,[]) > File "/Users/max/Desktop/sage-2.8.6-PowerMacintosh-Darwin/local/lib/ > python2.5/site-packages/IPython/Shell.py", line 44, in > from IPython.iplib import InteractiveShell > File "/Users/max/Desktop/sage-2.8.6-PowerMacintosh-Darwin/local/lib/ > python2.5/site-packages/IPython/iplib.py", line 58, in > import pickleshare > ImportError: No module named pickleshare > ______________________________ > > Yes, I have Fink 0.24.14 installed. > > Thanks, Max > > > > --~--~---------~--~----~------------~-------~--~----~ > To post to this group, send email to sage-support at googlegroups.com > To unsubscribe from this group, send email to > sage-support-unsubscribe at googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-support > URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ > -~----------~----~----~----~------~----~------~--~--- > > > > -- > William Stein > Associate Professor of Mathematics > University of Washington > http://wstein.org > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev > From vivainio at gmail.com Thu Oct 18 02:47:46 2007 From: vivainio at gmail.com (Ville M. Vainio) Date: Thu, 18 Oct 2007 09:47:46 +0300 Subject: [IPython-dev] Fwd: [sage-support] Re: install problem with pickleshare In-Reply-To: <96de71860710170322qbb1bae6yd5fcb905267db4a9@mail.gmail.com> References: <1192514681.204773.36580@i13g2000prf.googlegroups.com> <85e81ba30710160006m2c2f3ae0g215a1eeae57095ed@mail.gmail.com> <1192548768.188492.94600@v23g2000prn.googlegroups.com> <85e81ba30710161612n1f5907dey924e0120a2989639@mail.gmail.com> <96de71860710170322qbb1bae6yd5fcb905267db4a9@mail.gmail.com> Message-ID: <46cb515a0710172347p11425253tb60ec0132161b03f@mail.gmail.com> Perhaps this is due to sys.path not containing Extensions yet for some reason (I'm not aware why this is not a problem on my box). To get over it quickly, change line: > python2.5/site-packages/IPython/iplib.py", line 58, in > import pickleshare to: from IPython.Extensions import pickleshare. -- Ville M. Vainio - vivainio.googlepages.com blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio' From imgrey at gmail.com Thu Oct 18 04:29:58 2007 From: imgrey at gmail.com (Vitaliyi) Date: Thu, 18 Oct 2007 11:29:58 +0300 Subject: [IPython-dev] ipython1 kill() Message-ID: <3aac340710180129h4c3a4d4fga80389bbffcc455f@mail.gmail.com> Good Day How to kill the running task on engine ? I was trying this : """ import ipython1.kernel.api as kernel rc = kernel.RemoteController(('127.0.0.1',10105)) rc.getIDs() #[0] rc.execute(0, 'import time; time.sleep(1000)') rc.killall() rc.queueStatusAll() # ; Engine: 0; Pending: "execute('import time; time.sleep(1000)')" rc.killAll() # <-- Hangs rc.queueStatusAll() #; Engine: 0; Pending: "execute('import time; time.sleep(1000)')"; Command: 'kill()' """ Thanks From imgrey at gmail.com Thu Oct 18 05:52:08 2007 From: imgrey at gmail.com (Vitaliyi) Date: Thu, 18 Oct 2007 12:52:08 +0300 Subject: [IPython-dev] str(None) Message-ID: <3aac340710180252r5264aa12i412031fdf9caa3d8@mail.gmail.com> Why rc.queueStatusAll()[0][1]['pending'] == 'None', but not None ? From ellisonbg.net at gmail.com Thu Oct 18 18:31:13 2007 From: ellisonbg.net at gmail.com (Brian Granger) Date: Thu, 18 Oct 2007 16:31:13 -0600 Subject: [IPython-dev] ipython1 kill() In-Reply-To: <3aac340710180129h4c3a4d4fga80389bbffcc455f@mail.gmail.com> References: <3aac340710180129h4c3a4d4fga80389bbffcc455f@mail.gmail.com> Message-ID: <6ce0ac130710181531v632b0f7ftac19de9ba138f2f@mail.gmail.com> The engines cannot be killed when they are busy. The reason is that you can't send a signal over the network. To really do a hard kill you need to send a signal (using kill, etc.) and for that you simply have to log into the machine running the engine or use some sort of cluster management software to kill the process. We do have long term plans on adding some of this type of stuff to IPython1 itself, but we are not there yet. Let me know if you have any other questions. Brian On 10/18/07, Vitaliyi wrote: > Good Day > > How to kill the running task on engine ? I was trying this : > > """ > import ipython1.kernel.api as kernel > rc = kernel.RemoteController(('127.0.0.1',10105)) > rc.getIDs() #[0] > rc.execute(0, 'import time; time.sleep(1000)') > rc.killall() > rc.queueStatusAll() # ; Engine: 0; Pending: > "execute('import time; time.sleep(1000)')" > rc.killAll() # <-- Hangs > rc.queueStatusAll() #; Engine: 0; Pending: > "execute('import time; time.sleep(1000)')"; Command: 'kill()' > > """ > > Thanks > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev > From ellisonbg.net at gmail.com Mon Oct 22 21:48:33 2007 From: ellisonbg.net at gmail.com (Brian Granger) Date: Mon, 22 Oct 2007 19:48:33 -0600 Subject: [IPython-dev] Fwd: [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <8605F161-155A-49CD-840B-DE052514D406@apple.com> References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> Message-ID: <6ce0ac130710221848w3ceb4878uc458a3f252f66c9d@mail.gmail.com> This is a heads up for ipython devs who use OS X. I guess the builtin python on Leopard will have a working readline module, but it won't use readline underneath the hood. Instead is will use EditLine library: http://thrysoee.dk/editline/ Once Leopard is out in the public, we can investigate how this will play with ipython. Cheers, Brian ---------- Forwarded message ---------- From: Edward Moy Date: Oct 22, 2007 12:19 PM Subject: Re: [Pythonmac-SIG] readline support for OS X Leopard To: Noah Gift Cc: PythonMac mac On Oct 21, 2007, at 10:51 PM, Noah Gift wrote: I have been getting ready for the official leopard release in a few days, and have been a bit worried about readline support. I forgot what I did to get it to work for IPython, which I absolutely cannot live without anymore. Is there a plan for a Leopard binary that fixes readline, or can I help someone prepare some documentation on getting readline working properly. I don't have a lot of time during the next couple of weeks to get into compile hell, but if someone has any easy fix to get readline to work, I would greatly appreciate it. The installed version of python on Leopard will actually have readline support turned on by default, but it uses the EditLine (libedit) library, not the GNU Readline (due to licensing reasons). While functionally equivalent, the command syntax is different. From the python(1) man page: 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") -------------------------------------------------------------------------- Edward Moy Apple Computer, Inc. emoy at apple.com _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG at python.org http://mail.python.org/mailman/listinfo/pythonmac-sig From vivainio at gmail.com Wed Oct 24 11:14:57 2007 From: vivainio at gmail.com (Ville M. Vainio) Date: Wed, 24 Oct 2007 18:14:57 +0300 Subject: [IPython-dev] Another unicode problem In-Reply-To: <46F1632B.6030300@bostream.nu> References: <46EEB766.9080906@bostream.nu> <46cb515a0709180706w3f11c629g34b405e646479404@mail.gmail.com> <46cb515a0709181039v9633042y3dd166649f2a6c2c@mail.gmail.com> <46F1632B.6030300@bostream.nu> Message-ID: <46cb515a0710240814ucad8dcdp319e19c211225389@mail.gmail.com> On 9/19/07, J?rgen Stenarson wrote: > There are still problems with unicode commandlines. I think it is > related to the problem in ticket #129 which was fixed in r2168. > > It seems that before calling compile a string needs to be encoded using > the correct encoding. ... I checked in this patch. I'm not totally confident about it yet, though - we still risk being slightly broken w/ unicode. I guess we can live with that. -- Ville M. Vainio - vivainio.googlepages.com blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio' From bwaters at nrao.edu Fri Oct 26 17:06:46 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Fri, 26 Oct 2007 15:06:46 -0600 Subject: [IPython-dev] Fwd: [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <6ce0ac130710221848w3ceb4878uc458a3f252f66c9d@mail.gmail.com> References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <6ce0ac130710221848w3ceb4878uc458a3f252f66c9d@mail.gmail.com> Message-ID: If someone can point me in the right direction I'd love to solve this one. The Python that ships with Leopard uses libedit, which includes a readline wrapper. It seems to work, but I can't get the tab-completion to work in IPython. ANSI color works fine. History navigation works fine. Command-line editing works fine. No tab completion. I can enter the lines one at a time at a Python console, everything seems to work. readline is imported. But I don't get the actual tab completion. Got it to work on Tiger (OS X 10.4.x) no problem. On Oct 22, 2007, at 7:48 PM, Brian Granger wrote: > This is a heads up for ipython devs who use OS X. I guess the builtin > python on Leopard will have a working readline module, but it won't > use readline underneath the hood. Instead is will use EditLine > library: > > http://thrysoee.dk/editline/ > > Once Leopard is out in the public, we can investigate how this will > play with ipython. > > Cheers, > > Brian > > ---------- Forwarded message ---------- > From: Edward Moy > Date: Oct 22, 2007 12:19 PM > Subject: Re: [Pythonmac-SIG] readline support for OS X Leopard > To: Noah Gift > Cc: PythonMac mac > > > > On Oct 21, 2007, at 10:51 PM, Noah Gift wrote: > I have been getting ready for the official leopard release in a few > days, and have been a bit worried about readline support. I forgot > what I did to get it to work for IPython, which I absolutely cannot > live without anymore. Is there a plan for a Leopard binary that fixes > readline, or can I help someone prepare some documentation on getting > readline working properly. I don't have a lot of time during the next > couple of weeks to get into compile hell, but if someone has any easy > fix to get readline to work, I would greatly appreciate it. > The installed version of python on Leopard will actually have readline > support turned on by default, but it uses the EditLine (libedit) > library, not the GNU Readline (due to licensing reasons). While > functionally equivalent, the command syntax is different. From the > python(1) man page: > > > 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") > > > > > -------------------------------------------------------------------------- > > Edward Moy > > Apple Computer, Inc. > > emoy at apple.com > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev From bwaters at nrao.edu Fri Oct 26 17:14:11 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Fri, 26 Oct 2007 15:14:11 -0600 Subject: [IPython-dev] Fwd: [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <6ce0ac130710221848w3ceb4878uc458a3f252f66c9d@mail.gmail.com> Message-ID: <8FE90326-8C37-4CA1-A145-0B7D82986CEA@nrao.edu> Very sorry - I hit the "send" button too quickly... I suppose I should offer some introduction since I don't usually post to this list! I'm a programmer for the National Radio Astronomy Observatory out in south-western New Mexico. We use IPython for our radio-astronomy data analysis toolset. I work mostly on the Mac. http://www.aoc.nrao.edu/~bwaters Happy to help if I can... - boyd On Oct 26, 2007, at 3:06 PM, Boyd Waters wrote: > If someone can point me in the right direction I'd love to solve this > one. > > The Python that ships with Leopard uses libedit, which includes a > readline wrapper. > > It seems to work, but I can't get the tab-completion to work in > IPython. > > ANSI color works fine. History navigation works fine. Command-line > editing works fine. > > No tab completion. From ellisonbg.net at gmail.com Fri Oct 26 17:51:55 2007 From: ellisonbg.net at gmail.com (Brian Granger) Date: Fri, 26 Oct 2007 15:51:55 -0600 Subject: [IPython-dev] Fwd: [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <6ce0ac130710221848w3ceb4878uc458a3f252f66c9d@mail.gmail.com> Message-ID: <6ce0ac130710261451u78ca9350x5c40dd25de90cfb5@mail.gmail.com> Boyd, Great, I don't have Leopard yet, and it will be a few weeks before my main system is running it. In the meantime if you want to work on this, I would simply start digging into the ipython source to see where readline is used. Fernando and Ville are probably the experts on this....but Fernando doesn't run OS X (I'm not sure about Ville). But maybe they could point you in the right direction for where to start looking. Here are some of the relevant files in the ipython source: http://projects.scipy.org/ipython/ipython/browser/ipython/trunk/IPython/rlineimpl.py http://projects.scipy.org/ipython/ipython/browser/ipython/trunk/IPython/iplib.py http://projects.scipy.org/ipython/ipython/browser/ipython/trunk/IPython/completer.py If you start searching for readline you will quickly see what needs to be done. I would start by looking at rlineimpl.py, which imports the correct readline. This is called by iplib.py, which passes the readline module to a completer object. Let us know if you have questions. Brian On 10/26/07, Boyd Waters wrote: > If someone can point me in the right direction I'd love to solve this > one. > > The Python that ships with Leopard uses libedit, which includes a > readline wrapper. > > It seems to work, but I can't get the tab-completion to work in IPython. > > ANSI color works fine. History navigation works fine. Command-line > editing works fine. > > No tab completion. > > I can enter the lines one at a time at a Python console, everything > seems to work. readline is imported. But I don't get the actual tab > completion. > > Got it to work on Tiger (OS X 10.4.x) no problem. > > > On Oct 22, 2007, at 7:48 PM, Brian Granger wrote: > > > This is a heads up for ipython devs who use OS X. I guess the builtin > > python on Leopard will have a working readline module, but it won't > > use readline underneath the hood. Instead is will use EditLine > > library: > > > > http://thrysoee.dk/editline/ > > > > Once Leopard is out in the public, we can investigate how this will > > play with ipython. > > > > Cheers, > > > > Brian > > > > ---------- Forwarded message ---------- > > From: Edward Moy > > Date: Oct 22, 2007 12:19 PM > > Subject: Re: [Pythonmac-SIG] readline support for OS X Leopard > > To: Noah Gift > > Cc: PythonMac mac > > > > > > > > On Oct 21, 2007, at 10:51 PM, Noah Gift wrote: > > I have been getting ready for the official leopard release in a few > > days, and have been a bit worried about readline support. I forgot > > what I did to get it to work for IPython, which I absolutely cannot > > live without anymore. Is there a plan for a Leopard binary that fixes > > readline, or can I help someone prepare some documentation on getting > > readline working properly. I don't have a lot of time during the next > > couple of weeks to get into compile hell, but if someone has any easy > > fix to get readline to work, I would greatly appreciate it. > > The installed version of python on Leopard will actually have readline > > support turned on by default, but it uses the EditLine (libedit) > > library, not the GNU Readline (due to licensing reasons). While > > functionally equivalent, the command syntax is different. From the > > python(1) man page: > > > > > > 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") > > > > > > > > > > -------------------------------------------------------------------------- > > > > Edward Moy > > > > Apple Computer, Inc. > > > > emoy at apple.com > > > > _______________________________________________ > > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > > http://mail.python.org/mailman/listinfo/pythonmac-sig > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev > From bwaters at nrao.edu Fri Oct 26 19:59:13 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Fri, 26 Oct 2007 17:59:13 -0600 Subject: [IPython-dev] Fwd: [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <6ce0ac130710261451u78ca9350x5c40dd25de90cfb5@mail.gmail.com> References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <6ce0ac130710221848w3ceb4878uc458a3f252f66c9d@mail.gmail.com> <6ce0ac130710261451u78ca9350x5c40dd25de90cfb5@mail.gmail.com> Message-ID: Thanks very much, Brian! I've been piddling through those files - rlineimpl.py and friends - and funny thing is that they all seem to work fine, but I'll keep digging until I can get the TAB key event. Lots of print statements show me that, as far as I know now, there's nothing wrong with the (underlying) readline. But I don't know. Stay tuned! - boyd On Oct 26, 2007, at 3:51 PM, Brian Granger wrote: > If you start searching for readline you will quickly see what needs to > be done. I would start by looking at rlineimpl.py, which imports the > correct readline. This is called by iplib.py, which passes the > readline module to a completer object. > > Let us know if you have questions. From bwaters at nrao.edu Fri Oct 26 21:20:56 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Fri, 26 Oct 2007 19:20:56 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> Message-ID: <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> Oops, I spoke too soon when I said that readline support with Leopard's Python works for me with IPython. Many things DO work, but tab-completion does NOT. I am trying to get tab completion working. Forget IPython, just try this "unit test" of rlcompleter with the Python that ships with Leopard: See http://docs.python.org/lib/module-rlcompleter.html Launch python from a Terminal shell prompt. at the prompt, type the following commands: import rlcompleter import readline readline.parse_and_bind("tab: complete") Now, try it out: start some input, then hit the Tab key to get some possible completions: readline. The tab is passed as raw input, and the completer does not give any completions. Tried with both Terminal and xterm. Reported as Apple Bug # 5563035 I've also asked the IPython devs for help - and volunteered to get this resolved somehow for them -- but I don't think it's an IPython problem (since you can do this from "raw" interactive python). Here's hoping... - boyd Boyd Waters Mac Programmer National Radio Astronomy Observatory http://www.aoc.nrao.edu/~bwaters On Oct 22, 2007, at 12:35 PM, Noah Gift wrote: > Edward, > > Thanks for the information. Do you know of a way to get IPython to > use edline instead? IPython is growing in popularity for Python > programmers, and it seems like getting a way forward that works with > edline makes sense, or maybe I am wrong and people will need to just > manually install readline themselves. > > Noah > > On 10/22/07, Edward Moy wrote: > On Oct 21, 2007, at 10:51 PM, Noah Gift wrote: > >> I have been getting ready for the official leopard release in a few >> days, and have been a bit worried about readline support. I forgot >> what I did to get it to work for IPython, which I absolutely cannot >> live without anymore. Is there a plan for a Leopard binary that >> fixes readline, or can I help someone prepare some documentation on >> getting readline working properly. I don't have a lot of time >> during the next couple of weeks to get into compile hell, but if >> someone has any easy fix to get readline to work, I would greatly >> appreciate it. > > > The installed version of python on Leopard will actually have > readline support turned on by default, but it uses the EditLine > (libedit) library, not the GNU Readline (due to licensing reasons). > While functionally equivalent, the command syntax is different. > From the python(1) man page: > > > 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") > > > -------------------------------------------------------------------------- > Edward Moy > Apple Computer, Inc. > emoy at apple.com > > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From ellisonbg.net at gmail.com Fri Oct 26 22:19:50 2007 From: ellisonbg.net at gmail.com (Brian Granger) Date: Fri, 26 Oct 2007 20:19:50 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> Message-ID: <6ce0ac130710261919ga748fc1v135522c38e2c8dc4@mail.gmail.com> The rlineimpl.py module is the place in python where readline gets imported. I would look there and also I would look to see where ipython is doing its equivalent of parse_and_bind. Brian On 10/26/07, Noah Gift wrote: > Ed, > > You are a genius! Thanks, I totally forgot you told me that. > > So for the record when you launch IPython: > > import readline > readline.parse_and_bind ("bind ^I rl_complete") > > Then do something like: > > import os > > and you will get > > > In [5]: os. > Display all 234 possibilities? (y or n) > > Ok, what is the easiest way to get IPython to automatically do this? This > would be great to document. > > > Also, (shamelessly off-topic), if anyone has GVim working...let me know, > cough, it is for Python and it is on Mac :) > > > On 10/26/07, emoy at apple.com wrote: > > > > It right there in my original message (and in the python man page). You > have to use EditLine syntax: > > > > > > readline.parse_and_bind ("bind ^I rl_complete") > > > > > > Ed > > > > > > > > > > On Oct 26, 2007, at 6:46 PM, Noah Gift wrote: > > > > I was just going to say the same thing. Getting this to work and then > GVim, and I will be quite happy. > > > > > > On 10/26/07, Boyd Waters < bwaters at nrao.edu > wrote: > > > Oops, I spoke too soon when I said that readline support with > > > Leopard's Python works for me with IPython. > > > > > > Many things DO work, but tab-completion does NOT. > > > > > > I am trying to get tab completion working. > > > > > > Forget IPython, just try this "unit test" of rlcompleter with the > > > Python that ships with Leopard: > > > > > > See http://docs.python.org/lib/module-rlcompleter.html > > > > > > Launch python from a Terminal shell prompt. > > > at the prompt, type the following commands: > > > import rlcompleter > > > import readline > > > readline.parse_and_bind("tab: complete") > > > > > > Now, try it out: start some input, then hit the Tab key to get some > > > possible completions: > > > > > > readline. > > > > > > The tab is passed as raw input, and the completer does not give any > > > completions. > > > > > > Tried with both Terminal and xterm. > > > > > > > > > Reported as Apple Bug # 5563035 > > > > > > I've also asked the IPython devs for help - and volunteered to get > > > this resolved somehow for them -- but I don't think it's an IPython > > > problem (since you can do this from "raw" interactive python). > > > > > > Here's hoping... > > > > > > > > > - boyd > > > > > > > > > Boyd Waters > > > Mac Programmer > > > National Radio Astronomy Observatory > > > http://www.aoc.nrao.edu/~bwaters > > > > > > > > > On Oct 22, 2007, at 12:35 PM, Noah Gift wrote: > > > > > > > Edward, > > > > > > > > Thanks for the information. Do you know of a way to get IPython to > > > > use edline instead? IPython is growing in popularity for Python > > > > programmers, and it seems like getting a way forward that works with > > > > edline makes sense, or maybe I am wrong and people will need to just > > > > manually install readline themselves. > > > > > > > > Noah > > > > > > > > On 10/22/07, Edward Moy < emoy at apple.com> wrote: > > > > On Oct 21, 2007, at 10:51 PM, Noah Gift wrote: > > > > > > > >> I have been getting ready for the official leopard release in a few > > > >> days, and have been a bit worried about readline support. I forgot > > > >> what I did to get it to work for IPython, which I absolutely cannot > > > >> live without anymore. Is there a plan for a Leopard binary that > > > >> fixes readline, or can I help someone prepare some documentation on > > > >> getting readline working properly. I don't have a lot of time > > > >> during the next couple of weeks to get into compile hell, but if > > > >> someone has any easy fix to get readline to work, I would greatly > > > >> appreciate it. > > > > > > > > > > > > The installed version of python on Leopard will actually have > > > > readline support turned on by default, but it uses the EditLine > > > > (libedit) library, not the GNU Readline (due to licensing reasons). > > > > While functionally equivalent, the command syntax is different. > > > > From the python(1) man page: > > > > > > > > > > > > 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") > > > > > > > > > > > > > -------------------------------------------------------------------------- > > > > Edward Moy > > > > Apple Computer, Inc. > > > > emoy at apple.com > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > > > > http://mail.python.org/mailman/listinfo/pythonmac-sig > > > > > > > > > > > > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > From bwaters at nrao.edu Sat Oct 27 00:08:46 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Fri, 26 Oct 2007 22:08:46 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> Message-ID: On Oct 26, 2007, at 7:50 PM, emoy at apple.com wrote: > It right there in my original message > You have to use EditLine syntax: > > readline.parse_and_bind ("bind ^I rl_complete") Oh good grief... I'm a *user*. You can't expect me to *read*... um.. what is the smiley-thing for hanging my head in shame? Very happy to have this sorted out! Leopard is great, folks! Stay tuned for a patch! something like if 'darwin' in os.platform: - boyd From vivainio at gmail.com Sat Oct 27 04:37:24 2007 From: vivainio at gmail.com (Ville M. Vainio) Date: Sat, 27 Oct 2007 11:37:24 +0300 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> Message-ID: <46cb515a0710270137v4a7c951fq9c7267d81e70b24e@mail.gmail.com> On 10/27/07, Boyd Waters 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_defaults.py, and we'll advise leopard users to ignore the ipythonrc and move to the new style configuration (ipy_user_conf.py). -- Ville M. Vainio - vivainio.googlepages.com blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio' From bwaters at nrao.edu Sat Oct 27 13:43:10 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Sat, 27 Oct 2007 11:43:10 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <46cb515a0710270137v4a7c951fq9c7267d81e70b24e@mail.gmail.com> References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> <46cb515a0710270137v4a7c951fq9c7267d81e70b24e@mail.gmail.com> Message-ID: <1B03D89D-BC1E-472E-AB43-89F86735BAF0@nrao.edu> 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 leopard > users to ignore the ipythonrc and move to the new style configuration > (ipy_user_conf.py). From fperez.net at gmail.com Sat Oct 27 14:25:11 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Sat, 27 Oct 2007 12:25:11 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <1B03D89D-BC1E-472E-AB43-89F86735BAF0@nrao.edu> References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> <46cb515a0710270137v4a7c951fq9c7267d81e70b24e@mail.gmail.com> <1B03D89D-BC1E-472E-AB43-89F86735BAF0@nrao.edu> Message-ID: On 10/27/07, Boyd Waters 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 core so it works for any user, without bugging them about updating their config setup or having to think at all. If they have requested readline support, then it should just work. We already have platform-specific code to work around a things in Windows, having a little bit of Leopard support doesn't bother me one bit. Have a look at the attached patch, and if something like that works well, we can easily just drop it in. Cheers, f -------------- next part -------------- A non-text attachment was scrubbed... Name: ip_leopard.diff Type: text/x-patch Size: 876 bytes Desc: not available URL: From vivainio at gmail.com Mon Oct 29 09:35:43 2007 From: vivainio at gmail.com (Ville M. Vainio) Date: Mon, 29 Oct 2007 15:35:43 +0200 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> <46cb515a0710270137v4a7c951fq9c7267d81e70b24e@mail.gmail.com> <1B03D89D-BC1E-472E-AB43-89F86735BAF0@nrao.edu> Message-ID: <46cb515a0710290635v3c1be843k9076361a99436593@mail.gmail.com> On 10/27/07, Fernando Perez wrote: > Have a look at the attached patch, and if something like that works > well, we can easily just drop it in. ipy_defaults.py is in the core... though having this in iplib is ok as well, I gues. Anyone wanting to change this / use thi vi mode is rare enough, probably. -- Ville M. Vainio - vivainio.googlepages.com blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio' From jorgen.stenarson at bostream.nu Mon Oct 29 14:55:22 2007 From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=) Date: Mon, 29 Oct 2007 19:55:22 +0100 Subject: [IPython-dev] [IPython-user] Chinese char width problem in pyreadline In-Reply-To: <19b355330710281108v295fdc7fl57fe825e2bc2509@mail.gmail.com> References: <19b355330710211147s44984253na06bc59052ea80d7@mail.gmail.com> <19b355330710220846o1081be21ofbe5e9b70b18092d@mail.gmail.com> <471CD2B8.5090206@bostream.nu> <19b355330710271902w68ae1ea5qb7433296f81bf9c1@mail.gmail.com> <4724CAE1.2030706@bostream.nu> <19b355330710281108v295fdc7fl57fe825e2bc2509@mail.gmail.com> Message-ID: <47262C9A.8090209@bostream.nu> I have comitted the patch to svn. It would be good if as many users as possible could test pyreadline from svn so we can discover any problems. You may have to delete your .pythonhistory file because the patch assumes it is encoded in utf8. I had some problems getting svn to use the patch file, it seems my version doesn't like to get unicode input. I did some manual editing of the file to get it to work. This means I may have messed up some of your intended changes so please look at it. I also made a change to your patch in the ensure_text function in console.py. I do decode(consolecodepage,"replace") instead of decode("utf8","replace"). Using consolecodepage makes tab completion work for me on folders/directories using non-ascii characters. /J?rgen pan skrev: > Done. > > 2007/10/29, J?rgen Stenarson >: > > Hi > > can you recreate your patches as a single file using > svn diff>wide.patch in the root directory of pyreadline? > > Or if you use tortoise svn you should be able to right click the root > folder of pyreadline and choose create patch. > > /J?rgen > > From m.vanland at gmail.com Mon Oct 29 17:44:22 2007 From: m.vanland at gmail.com (Michael Vanlandingham) Date: Mon, 29 Oct 2007 14:44:22 -0700 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> <46cb515a0710270137v4a7c951fq9c7267d81e70b24e@mail.gmail.com> <1B03D89D-BC1E-472E-AB43-89F86735BAF0@nrao.edu> Message-ID: <0005A287-B10B-4F28-8F91-B6B23796BA90@gmail.com> 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 say commit the change. Thanks -- you guys made my day! Michael On Oct 27, 2007, at 11:25 AM, Fernando Perez wrote: > On 10/27/07, Boyd Waters 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 core so > it works for any user, without bugging them about updating their > config setup or having to think at all. If they have requested > readline support, then it should just work. We already have > platform-specific code to work around a things in Windows, having a > little bit of Leopard support doesn't bother me one bit. > > Have a look at the attached patch, and if something like that works > well, we can easily just drop it in. > > Cheers, > > f > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From ellisonbg.net at gmail.com Tue Oct 30 17:43:00 2007 From: ellisonbg.net at gmail.com (Brian Granger) Date: Tue, 30 Oct 2007 15:43:00 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <0005A287-B10B-4F28-8F91-B6B23796BA90@gmail.com> References: <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> <46cb515a0710270137v4a7c951fq9c7267d81e70b24e@mail.gmail.com> <1B03D89D-BC1E-472E-AB43-89F86735BAF0@nrao.edu> <0005A287-B10B-4F28-8F91-B6B23796BA90@gmail.com> Message-ID: <6ce0ac130710301443y10f6ae09n5112768d55097f49@mail.gmail.com> 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 need to do a test of exactly what readline is installed as well as an os test. But, I won't have Leopard running on my system for a few more weeks so I can't help with this. Can anyone play around to see if it is possible to detect which readline is installed? Thanks, Brian On 10/29/07, Michael Vanlandingham wrote: > 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 say commit the change. > > Thanks -- you guys made my day! > Michael > > > On Oct 27, 2007, at 11:25 AM, Fernando Perez wrote: > > > On 10/27/07, Boyd Waters 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 core so > > it works for any user, without bugging them about updating their > > config setup or having to think at all. If they have requested > > readline support, then it should just work. We already have > > platform-specific code to work around a things in Windows, having a > > little bit of Leopard support doesn't bother me one bit. > > > > Have a look at the attached patch, and if something like that works > > well, we can easily just drop it in. > > > > Cheers, > > > > f > > _______________________________________________ > > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > > http://mail.python.org/mailman/listinfo/pythonmac-sig > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev > From m.vanland at gmail.com Tue Oct 30 18:34:12 2007 From: m.vanland at gmail.com (Michael VanLandingham) Date: Tue, 30 Oct 2007 15:34:12 -0700 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <6ce0ac130710301443y10f6ae09n5112768d55097f49@mail.gmail.com> References: <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> <46cb515a0710270137v4a7c951fq9c7267d81e70b24e@mail.gmail.com> <1B03D89D-BC1E-472E-AB43-89F86735BAF0@nrao.edu> <0005A287-B10B-4F28-8F91-B6B23796BA90@gmail.com> <6ce0ac130710301443y10f6ae09n5112768d55097f49@mail.gmail.com> Message-ID: 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.dylib I suppose one could also check for a "real" readline in "/usr/local", in case someone installed it. -mvl On Oct 30, 2007, at 2:43 PM, Brian Granger wrote: > 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 need to do a test of exactly what readline is > installed as well as an os test. But, I won't have Leopard running on > my system for a few more weeks so I can't help with this. > > Can anyone play around to see if it is possible to detect which > readline is installed? > > Thanks, > > Brian > > On 10/29/07, Michael Vanlandingham wrote: >> 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 say commit the change. >> >> Thanks -- you guys made my day! >> Michael >> >> >> On Oct 27, 2007, at 11:25 AM, Fernando Perez wrote: >> >>> On 10/27/07, Boyd Waters 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 core >>> so >>> it works for any user, without bugging them about updating their >>> config setup or having to think at all. If they have requested >>> readline support, then it should just work. We already have >>> platform-specific code to work around a things in Windows, having a >>> little bit of Leopard support doesn't bother me one bit. >>> >>> Have a look at the attached patch, and if something like that works >>> well, we can easily just drop it in. >>> >>> Cheers, >>> >>> f >>> _______________________________________________ >>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >>> http://mail.python.org/mailman/listinfo/pythonmac-sig >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans_meine at gmx.net Tue Oct 30 18:41:58 2007 From: hans_meine at gmx.net (Hans Meine) Date: Tue, 30 Oct 2007 23:41:58 +0100 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <6ce0ac130710301443y10f6ae09n5112768d55097f49@mail.gmail.com> Message-ID: <200710302341.59304.hans_meine@gmx.net> On Dienstag 30 Oktober 2007, Michael VanLandingham wrote: > 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.dylib > > I suppose one could also check for a "real" readline in "/usr/local", > in case someone installed it. 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 all too easy..) -- Ciao, / / .o. /--/ ..o / / ANS ooo -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: From bwaters at nrao.edu Tue Oct 30 19:12:33 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Tue, 30 Oct 2007 17:12:33 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <200710302341.59304.hans_meine@gmx.net> References: <6ce0ac130710301443y10f6ae09n5112768d55097f49@mail.gmail.com> <200710302341.59304.hans_meine@gmx.net> Message-ID: 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 > all too easy..) Ouch! I represent that remark! OK, I've got my Leopard development system right here and I've got the Python 2.5.1/readline that we maintain for our science application. print os.system("otool -L %s" % readline.__file__) /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ lib-dynload/readline.so: /usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version 2.9.0) /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0) From bwaters at nrao.edu Tue Oct 30 20:08:14 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Tue, 30 Oct 2007 18:08:14 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> Message-ID: <343F48D9-6A49-46B6-BBFA-C6DFDB21486C@nrao.edu> On Oct 26, 2007, at 7:50 PM, emoy at apple.com wrote: > It right there in my original message (and in the python man page). > You have to use EditLine syntax: > > readline.parse_and_bind ("bind ^I rl_complete") Edward's example of using EditLine syntax works for my "raw python" test: $ python >>> import rlcompleter >>> import readline >>> readline.parse_and_bind ("bind ^I rl_complete") >>> readline.[TAB KEY PRESSED] readline.__class__ readline.__class__ readline.__class__ readline.__delattr__ readline.__delattr__ readline.__dict__ ... BUT If I change the IPython config file to use EditLine syntax, I get a segmentation fault when I start ipython. $ diff .ipython/ipythonrc.0 .ipython/ipythonrc 395c395 < readline_parse_and_bind tab: complete --- > readline_parse_and_bind bind ^I complete $ ipython Segmentation fault Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000006a000c6c Crashed Thread: 0 Thread 0 Crashed: 0 libSystem.B.dylib 0x91f22620 strcmp + 80 1 libedit.2.dylib 0x0044a906 map_bind + 1345 2 libedit.2.dylib 0x0044abec el_parse + 236 3 libedit.2.dylib 0x00457372 rl_parse_and_bind + 85 4 readline.so 0x00440e6a 0x440000 + 3690 5 org.python.python 0x0018d826 PyEval_EvalFrameEx + 17116 6 org.python.python 0x0018da08 PyEval_EvalFrameEx + 17598 7 org.python.python 0x0018da08 PyEval_EvalFrameEx + 17598 8 org.python.python 0x0018f47b PyEval_EvalCodeEx + 1638 9 org.python.python 0x0018daa5 PyEval_EvalFrameEx + 17755 10 org.python.python 0x0018f47b PyEval_EvalCodeEx + 1638 11 org.python.python 0x00139c47 PyFunction_SetClosure + 2646 12 org.python.python 0x0011fd5d PyObject_Call + 50 13 org.python.python 0x00128618 PyMethod_New + 2457 14 org.python.python 0x0011fd5d PyObject_Call + 50 15 org.python.python 0x00188b35 PyEval_CallObjectWithKeywords + 211 16 org.python.python 0x0012484d PyInstance_New + 305 17 org.python.python 0x0011fd5d PyObject_Call + 50 18 org.python.python 0x0018db3a PyEval_EvalFrameEx + 17904 19 org.python.python 0x0018f47b PyEval_EvalCodeEx + 1638 20 org.python.python 0x0018daa5 PyEval_EvalFrameEx + 17755 21 org.python.python 0x0018f47b PyEval_EvalCodeEx + 1638 22 org.python.python 0x0018f568 PyEval_EvalCode + 87 23 org.python.python 0x001a6a0c PyErr_Display + 1896 24 org.python.python 0x001a7036 PyRun_FileExFlags + 135 25 org.python.python 0x001a89a2 PyRun_SimpleFileExFlags + 421 26 org.python.python 0x001b3c23 Py_Main + 3095 27 org.python.pythonapp 0x00001fca 0x1000 + 4042 From robert.kern at gmail.com Tue Oct 30 20:12:51 2007 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 30 Oct 2007 19:12:51 -0500 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <343F48D9-6A49-46B6-BBFA-C6DFDB21486C@nrao.edu> References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> <343F48D9-6A49-46B6-BBFA-C6DFDB21486C@nrao.edu> Message-ID: Boyd Waters wrote: > On Oct 26, 2007, at 7:50 PM, emoy at apple.com wrote: > >> It right there in my original message (and in the python man page). >> You have to use EditLine syntax: >> >> readline.parse_and_bind ("bind ^I rl_complete") > > Edward's example of using EditLine syntax works for my "raw python" > test: > > $ python > >>> import rlcompleter > >>> import readline > >>> readline.parse_and_bind ("bind ^I rl_complete") > > >>> readline.[TAB KEY PRESSED] > readline.__class__ > readline.__class__ readline.__class__ > readline.__delattr__ > readline.__delattr__ readline.__dict__ > ... Try typing "b". -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From robert.kern at gmail.com Tue Oct 30 20:16:12 2007 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 30 Oct 2007 19:16:12 -0500 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> <343F48D9-6A49-46B6-BBFA-C6DFDB21486C@nrao.edu> Message-ID: Robert Kern wrote: > Boyd Waters wrote: >> On Oct 26, 2007, at 7:50 PM, emoy at apple.com wrote: >> >>> It right there in my original message (and in the python man page). >>> You have to use EditLine syntax: >>> >>> readline.parse_and_bind ("bind ^I rl_complete") >> Edward's example of using EditLine syntax works for my "raw python" >> test: >> >> $ python >> >>> import rlcompleter >> >>> import readline >> >>> readline.parse_and_bind ("bind ^I rl_complete") >> >> >>> readline.[TAB KEY PRESSED] >> readline.__class__ >> readline.__class__ readline.__class__ >> readline.__delattr__ >> readline.__delattr__ readline.__dict__ >> ... > > Try typing "b". Sorry, I misread your post. 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. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From bwaters at nrao.edu Tue Oct 30 20:25:47 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Tue, 30 Oct 2007 18:25:47 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <8605F161-155A-49CD-840B-DE052514D406@apple.com> <53FF9C03-3C1F-4934-9886-B41D27111A7A@nrao.edu> <1775F102-678B-4EF5-A032-DB4A41AFBE97@apple.com> <343F48D9-6A49-46B6-BBFA-C6DFDB21486C@nrao.edu> Message-ID: 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 understand yet. I believe I have worked out the conditional logic to determine when we're linked against the libedit library versus GNU readline. But from inside the python on Leopard - that uses libedit for its readline module - I can get tab-completion to WORK when I'm running python by using the EditLine syntax that Edward Moy suggested. BUT from inside *ipython* I get a segmentation fault. I was all set to add the code to the IPython ipylib.py but I need to determine the cause of the segfault first. I'm using IPython from subversion trunk with {2007-10-28} as the SVN tag. Thanks! - boyd From hans_meine at gmx.net Wed Oct 31 05:27:13 2007 From: hans_meine at gmx.net (Hans Meine) Date: Wed, 31 Oct 2007 10:27:13 +0100 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: Message-ID: <200710311027.13581.hans_meine@gmx.net> Am Mittwoch, 31. Oktober 2007 01:25:47 schrieb 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 understand yet. > > I believe I have worked out the conditional logic to determine when > we're linked against the libedit library versus GNU readline. > > But from inside the python on Leopard - that uses libedit for its > readline module - I can get tab-completion to WORK when I'm running > python by using the EditLine syntax that Edward Moy suggested. > > BUT from inside *ipython* I get a segmentation fault. Again - are you sure that both use the same python version? The friend I mentioned with three installed python versions got different python versions when he typed "python" vs. "ipython"... ;-/ Ciao, / / /--/ / / ANS From bwaters at nrao.edu Wed Oct 31 10:48:06 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Wed, 31 Oct 2007 08:48:06 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <200710311027.13581.hans_meine@gmx.net> References: <200710311027.13581.hans_meine@gmx.net> Message-ID: <8FD85BB2-E80B-43D2-AED1-61F84C9D7C77@nrao.edu> On Oct 31, 2007, at 3:27 AM, Hans Meine wrote: >> BUT from inside *ipython* I get a segmentation fault. > > Again - are you sure that both use the same python version? Thanks, good suggestion, but in this case I'm pretty sure. I uninstalled all MacPorts pythons before running this test. This is basically a clean install of Leopard. $ python Python 2.5.1 (r251:54863, Oct 5 2007, 21:08:09) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> import readline >>> import rlcompleter >>> print os.system("otool -L %s" % readline.__file__) /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ lib-dynload/readline.so: /usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version 2.9.0) /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0) 0 >>> readline.parse_and_bind ("bind ^I rl_complete") >>> readline.[TAB KEY PRESSED] readline.__class__ readline.__class__ readline.__class__ readline.__delattr__ readline.__delattr__ readline.__dict__ ... >>> ^D $ ipython In [1]: import os In [2]: import readline In [3]: import rlcompleter In [4]: print os.system("otool -L %s" % readline.__file__) /Library/Python/2.5/site-packages/IPython/rlineimpl.pyc: is not an object file 0 Hmm. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ellisonbg.net at gmail.com Wed Oct 31 11:28:31 2007 From: ellisonbg.net at gmail.com (Brian Granger) Date: Wed, 31 Oct 2007 09:28:31 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <8FD85BB2-E80B-43D2-AED1-61F84C9D7C77@nrao.edu> References: <200710311027.13581.hans_meine@gmx.net> <8FD85BB2-E80B-43D2-AED1-61F84C9D7C77@nrao.edu> Message-ID: <6ce0ac130710310828p2b2216d5g6b2554d8328df681@mail.gmail.com> Can you do look at the output of: head `which ipython` This will tell you which python your ipython (the ipython that is first in your path if there are multiple) is using. Brian On 10/31/07, Boyd Waters wrote: > > > > > On Oct 31, 2007, at 3:27 AM, Hans Meine wrote: > > BUT from inside *ipython* I get a segmentation fault. > > > Again - are you sure that both use the same python version? > > Thanks, good suggestion, but in this case I'm pretty sure. > > I uninstalled all MacPorts pythons before running this test. > This is basically a clean install of Leopard. > > > $ python > Python 2.5.1 (r251:54863, Oct 5 2007, 21:08:09) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import os > >>> import readline > >>> import rlcompleter > >>> print os.system("otool -L %s" % readline.__file__) > /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/readline.so: > /usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version > 2.9.0) > /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version > 5.4.0) > /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version > 1.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 111.0.0) > 0 > >>> readline.parse_and_bind ("bind ^I rl_complete") > >>> readline.[TAB KEY PRESSED]readline.__class__ > readline.__class__ > readline.__class__ > readline.__delattr__ readline.__delattr__ > readline.__dict__ > ... > > >>> ^D > > > > $ ipython > In [1]: import os > > In [2]: import readline > > In [3]: import rlcompleter > > In [4]: print os.system("otool -L %s" % readline.__file__) > /Library/Python/2.5/site-packages/IPython/rlineimpl.pyc: > is not an object file > 0 > > > Hmm. > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev > > From bwaters at nrao.edu Wed Oct 31 11:47:05 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Wed, 31 Oct 2007 09:47:05 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <6ce0ac130710310828p2b2216d5g6b2554d8328df681@mail.gmail.com> References: <200710311027.13581.hans_meine@gmx.net> <8FD85BB2-E80B-43D2-AED1-61F84C9D7C77@nrao.edu> <6ce0ac130710310828p2b2216d5g6b2554d8328df681@mail.gmail.com> Message-ID: 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: import commands (status, result) = commands.getstatusoutput( "otool -L %s | grep libedit" % _rl.__file__ ) if status == 0 and len(result) > 0: # we are bound to libedit - new in Leopard # _rl.parse_and_bind("bind ^I complete") print "Leopard libedit detected." have_libedit = True And that's what I see on the output when I start up ipython: $ ipython Leopard libedit detected. Python 2.5.1 (r251:54863, Oct 5 2007, 21:08:09) Type "copyright", "credits" or "license" for more information. IPython 0.8.2.svn.r2841 -- An enhanced Interactive Python. The problem is to pass the "complete" method correctly to libedit. In iplib.py, line 1342: # Configure readline according to user's prefs for rlcommand in self.rc.readline_parse_and_bind: if rlcommand.startswith("tab"): pass if readline.have_libedit: rlcommand = "bind ^I complete" print rlcommand readline.parse_and_bind(rlcommand) The FIRST time I launch IPython after making this change, I get an "Invalid command" error from readline: $ ipython Leopard libedit detected. bind ^I complete bind: Invalid command `complete'. "\C-l": possible-completions set show-all-if-ambiguous on "\C-o": tab-insert "\M-i": " " "\M-o": "\d\d\d\d" "\M-I": "\d\d\d\d" "\C-r": reverse-search-history "\C-s": forward-search-history "\C-p": history-search-backward "\C-n": history-search-forward "\e[A": history-search-backward "\e[B": history-search-forward "\C-k": kill-line "\C-u": unix-line-discard Python 2.5.1 (r251:54863, Oct 5 2007, 21:08:09) And the modules are compiled as a side-effect. AFTER the modules are compiled, I simply get a segfault: In [1]: ^D Do you really want to exit ([y]/n)? galatea:~ bwaters$ ipython Leopard libedit detected. bind ^I complete Segmentation fault SO: 1) How do I form the bind commands for libedit? "EditLine" syntax 2) The segfault is a bug, methinks. I posted it as such. On Oct 31, 2007, at 9:28 AM, Brian Granger wrote: > Can you do look at the output of: > > head `which ipython` > > This will tell you which python your ipython (the ipython that is > first in your path if there are multiple) is using. > > Brian > > > On 10/31/07, Boyd Waters wrote: >> >> >> >> >> On Oct 31, 2007, at 3:27 AM, Hans Meine wrote: >> >> BUT from inside *ipython* I get a segmentation fault. >> >> >> Again - are you sure that both use the same python version? >> >> Thanks, good suggestion, but in this case I'm pretty sure. >> >> I uninstalled all MacPorts pythons before running this test. >> This is basically a clean install of Leopard. >> >> >> $ python >> Python 2.5.1 (r251:54863, Oct 5 2007, 21:08:09) >> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin >> Type "help", "copyright", "credits" or "license" for more >> information. >>>>> import os >>>>> import readline >>>>> import rlcompleter >>>>> print os.system("otool -L %s" % readline.__file__) >> /System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >> python2.5/lib-dynload/readline.so: >> /usr/lib/libedit.2.dylib (compatibility version 2.0.0, current >> version >> 2.9.0) >> /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current >> version >> 5.4.0) >> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current >> version >> 1.0.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current >> version >> 111.0.0) >> 0 >>>>> readline.parse_and_bind ("bind ^I rl_complete") >>>>> readline.[TAB KEY PRESSED]readline.__class__ >> readline.__class__ >> readline.__class__ >> readline.__delattr__ readline.__delattr__ >> readline.__dict__ >> ... >> >>>>> ^D >> >> >> >> $ ipython >> In [1]: import os >> >> In [2]: import readline >> >> In [3]: import rlcompleter >> >> In [4]: print os.system("otool -L %s" % readline.__file__) >> /Library/Python/2.5/site-packages/IPython/rlineimpl.pyc: >> is not an object file >> 0 >> >> >> Hmm. >> >> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev >> >> From bwaters at nrao.edu Wed Oct 31 13:10:16 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Wed, 31 Oct 2007 11:10:16 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <200710311027.13581.hans_meine@gmx.net> <8FD85BB2-E80B-43D2-AED1-61F84C9D7C77@nrao.edu> <6ce0ac130710310828p2b2216d5g6b2554d8328df681@mail.gmail.com> Message-ID: 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 appropriate completer via readline.set_completer(). We have a couple of problems, though. A) The commands that are included in the default ipythonrc use readline syntax, and every one of them must be mapped to EditLine syntax B) Passing plausible values into Leopard's readline.parse_and_bind causes a segmentation fault. Sometimes. When it's compiled Python. Problem B is a bug report to Apple and I don't know for sure that I'll be able to fix. Problem A - what to do about EditLine syntax in general - may best be left to the new user prefs stuff. I don't know. What I am doing at the moment is hard-coding the mapping of the tab- completion as a special case in IPython's rilneimpl.py I don't like that, but it works. Also -- and a path to a Better World -- you can check IPython's rpimpl.py for a "uses_libedit" boolean value. We could add some logic in iplib.py that checks this value and reads an alternate ipythonrc in case we're running on Leopard. I get nauseous thinking about it. Anyway. Here are a couple of kludges for the specific case of tab-completion on Leopard-python: 1) Explicitly check for libedit on Darwin and bind the tab to rl_complete if so: --- IPython/rlineimpl.py 2007-10-30 17:34:13.000000000 -0600 +++ IPython/rlineimpl.py 2007-10-31 10:54:23.000000000 -0600 @@ -29,6 +29,16 @@ print "Failed GetOutputFile" have_readline = False +uses_libedit = False +if sys.platform == 'darwin' and have_readline: + import commands + (status, result) = commands.getstatusoutput( "otool -L %s | grep libedit" % _rl.__file__ ) + if status == 0 and len(result) > 0: + # we are bound to libedit - new in Leopard + _rl.parse_and_bind("bind ^I rl_complete") + print "Leopard libedit detected." + uses_libedit = True + # the clear_history() function was only introduced in Python 2.4 and is # actually optional in the readline API, so we must explicitly check for its # existence. Some known platforms actually don't have it. This thread: 2) Ignore any attempt to re-bind the tab key in the ipythonrc if we're using libedit: --- IPython/iplib.py 2007-10-30 18:32:36.000000000 -0600 +++ IPython/iplib.py 2007-10-31 10:59:03.000000000 -0600 @@ -1325,7 +1325,10 @@ if inputrc_name is None: home_dir = get_home_dir() if home_dir is not None: - inputrc_name = os.path.join(home_dir,'.inputrc') + inputrc_name = '.inputrc' + if readline.uses_libedit: + inputrc_name = '.editrc' + inputrc_name = os.path.join(home_dir, inputrc_name) if os.path.isfile(inputrc_name): try: readline.read_init_file(inputrc_name) @@ -1341,8 +1344,11 @@ # Configure readline according to user's prefs for rlcommand in self.rc.readline_parse_and_bind: - print rlcommand - readline.parse_and_bind(rlcommand) + if rlcommand.startswith("tab"): + pass + if not readline.uses_libedit: + print rlcommand + readline.parse_and_bind(rlcommand) # remove some chars from the delimiters list delims = readline.get_completer_delims() From bwaters at nrao.edu Wed Oct 31 13:43:03 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Wed, 31 Oct 2007 11:43:03 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <200710311027.13581.hans_meine@gmx.net> <8FD85BB2-E80B-43D2-AED1-61F84C9D7C77@nrao.edu> <6ce0ac130710310828p2b2216d5g6b2554d8328df681@mail.gmail.com> Message-ID: <8CD42B96-B4A0-427E-8BAB-6D10223DF4E3@nrao.edu> 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 appropriate completer via readline.set_completer(). We have a couple of problems, though. A) The commands that are included in the default ipythonrc use readline syntax, and every one of them must be mapped to EditLine syntax B) Passing plausible values into Leopard's readline.parse_and_bind causes a segmentation fault. Sometimes. When it's compiled Python. Problem B is a bug report to Apple and I don't know for sure that I'll be able to fix. Problem A - what to do about EditLine syntax in general - may best be left to the new user prefs stuff. I don't know. What I am doing at the moment is hard-coding the mapping of the tab- completion as a special case in IPython's rilneimpl.py I don't like that, but it works. Also -- and a path to a Better World -- you can check IPython's rpimpl.py for a "uses_libedit" boolean value. We could add some logic in iplib.py that checks this value and reads an alternate ipythonrc in case we're running on Leopard. I get nauseous thinking about it. Anyway. Here are a couple of kludges for the specific case of tab-completion on Leopard-python: 1) Explicitly check for libedit on Darwin and bind the tab to rl_complete if so: --- IPython/rlineimpl.py 2007-10-30 17:34:13.000000000 -0600 +++ IPython/rlineimpl.py 2007-10-31 10:54:23.000000000 -0600 @@ -29,6 +29,16 @@ print "Failed GetOutputFile" have_readline = False +uses_libedit = False +if sys.platform == 'darwin' and have_readline: + import commands + (status, result) = commands.getstatusoutput( "otool -L %s | grep libedit" % _rl.__file__ ) + if status == 0 and len(result) > 0: + # we are bound to libedit - new in Leopard + _rl.parse_and_bind("bind ^I rl_complete") + print "Leopard libedit detected." + uses_libedit = True + # the clear_history() function was only introduced in Python 2.4 and is # actually optional in the readline API, so we must explicitly check for its # existence. Some known platforms actually don't have it. This thread: 2) Ignore any attempt to re-bind the tab key in the ipythonrc if we're using libedit: --- IPython/iplib.py 2007-10-30 18:32:36.000000000 -0600 +++ IPython/iplib.py 2007-10-31 10:59:03.000000000 -0600 @@ -1325,7 +1325,10 @@ if inputrc_name is None: home_dir = get_home_dir() if home_dir is not None: - inputrc_name = os.path.join(home_dir,'.inputrc') + inputrc_name = '.inputrc' + if readline.uses_libedit: + inputrc_name = '.editrc' + inputrc_name = os.path.join(home_dir, inputrc_name) if os.path.isfile(inputrc_name): try: readline.read_init_file(inputrc_name) @@ -1341,8 +1344,11 @@ # Configure readline according to user's prefs for rlcommand in self.rc.readline_parse_and_bind: - print rlcommand - readline.parse_and_bind(rlcommand) + if rlcommand.startswith("tab"): + pass + if not readline.uses_libedit: + print rlcommand + readline.parse_and_bind(rlcommand) # remove some chars from the delimiters list delims = readline.get_completer_delims() From bwaters at nrao.edu Wed Oct 31 16:03:36 2007 From: bwaters at nrao.edu (Boyd Waters) Date: Wed, 31 Oct 2007 14:03:36 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: <8CD42B96-B4A0-427E-8BAB-6D10223DF4E3@nrao.edu> References: <200710311027.13581.hans_meine@gmx.net> <8FD85BB2-E80B-43D2-AED1-61F84C9D7C77@nrao.edu> <6ce0ac130710310828p2b2216d5g6b2554d8328df681@mail.gmail.com> <8CD42B96-B4A0-427E-8BAB-6D10223DF4E3@nrao.edu> Message-ID: On Oct 31, 2007, at 11:43 AM, Boyd Waters wrote: > What I am doing at the moment is hard-coding the mapping of the tab- > completion as a special case in IPython's rilneimpl.py My iplib.py patch was broken, as I had used a dirty local copy of the subversion repository to generate the patch. Very sorry. Here are the patches that implement my Leopard EditLine hack against IPython-SVN (2007-10-30) -------------- next part -------------- A non-text attachment was scrubbed... Name: rlineimpl.py.patch Type: application/octet-stream Size: 846 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: iplib.py.patch Type: application/octet-stream Size: 1189 bytes Desc: not available URL: -------------- next part -------------- I tested this process with a MacPorts port; here is that portfile: -------------- next part -------------- A non-text attachment was scrubbed... Name: Portfile Type: application/octet-stream Size: 1267 bytes Desc: not available URL: -------------- next part -------------- Perhaps if I learn more about the IPython prefs system I can generate a better patch in iplib,py Right now this patch simply tells IPython to ignore any key-binding lines that are in ipythonrc if we are running a Python that uses EditLine instead of GNU readline. The rlineimpl.py patch figures out if we are running against EditLine, and if so it binds the completion function to the tab key. This isn't great but it gets a part of my job done. - boyd Boyd Waters National Radio Astronomy Observatory Socorro, New Mexico http://www.aoc.nrao.edu/~bwaters From ellisonbg.net at gmail.com Wed Oct 31 17:09:03 2007 From: ellisonbg.net at gmail.com (Brian Granger) Date: Wed, 31 Oct 2007 15:09:03 -0600 Subject: [IPython-dev] [Pythonmac-SIG] readline support for OS X Leopard In-Reply-To: References: <200710311027.13581.hans_meine@gmx.net> <8FD85BB2-E80B-43D2-AED1-61F84C9D7C77@nrao.edu> <6ce0ac130710310828p2b2216d5g6b2554d8328df681@mail.gmail.com> <8CD42B96-B4A0-427E-8BAB-6D10223DF4E3@nrao.edu> Message-ID: <6ce0ac130710311409j785051d1u3e76012b500c7d6e@mail.gmail.com> Boyd, Thanks, I am going to try to get Leopard installed in a spare drive soon. When that happens, I will test and apply the patch. Cheers, Brian On 10/31/07, Boyd Waters wrote: > > On Oct 31, 2007, at 11:43 AM, Boyd Waters wrote: > > > What I am doing at the moment is hard-coding the mapping of the tab- > > completion as a special case in IPython's rilneimpl.py > > > My iplib.py patch was broken, as I had used a dirty local copy of the > subversion repository to generate the patch. > > Very sorry. > > Here are the patches that implement my Leopard EditLine hack against > IPython-SVN (2007-10-30) > > > > > > > > > > > I tested this process with a MacPorts port; here is that portfile: > > > > > > > Perhaps if I learn more about the IPython prefs system I can generate > a better patch in iplib,py > > Right now this patch simply tells IPython to ignore any key-binding > lines that are in ipythonrc if we are running a Python that uses > EditLine instead of GNU readline. The rlineimpl.py patch figures out > if we are running against EditLine, and if so it binds the completion > function to the tab key. > > This isn't great but it gets a part of my job done. > > > > - boyd > > Boyd Waters > National Radio Astronomy Observatory > Socorro, New Mexico > http://www.aoc.nrao.edu/~bwaters > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev > > >