From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: python.el fixes for Emacs 22 Date: Wed, 20 Feb 2008 13:30:22 +1300 Message-ID: <18363.29854.271108.937443@kahikatea.snap.net.nz> References: <87ve4sqsqe.fsf@stupidchicken.com> <18356.54892.186541.669277@kahikatea.snap.net.nz> <861w7euz7a.fsf@lola.quinscape.zz> <2cd46e7f0802150943x46e9bcb0i4c3b6075d48cc979@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1203467559 3773 80.91.229.12 (20 Feb 2008 00:32:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2008 00:32:39 +0000 (UTC) Cc: sdl.web@gmail.com, Ken Manheimer , cyd@stupidchicken.com, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 20 01:33:00 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JRctP-0008CD-4l for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2008 01:32:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRcsu-00047h-8Y for ged-emacs-devel@m.gmane.org; Tue, 19 Feb 2008 19:32:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRcsq-00047U-Az for emacs-devel@gnu.org; Tue, 19 Feb 2008 19:32:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRcsn-00047I-U9 for emacs-devel@gnu.org; Tue, 19 Feb 2008 19:32:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRcsn-00047F-NZ for emacs-devel@gnu.org; Tue, 19 Feb 2008 19:32:21 -0500 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JRcsf-0005TY-SG; Tue, 19 Feb 2008 19:32:14 -0500 Original-Received: from kahikatea.snap.net.nz (237.31.255.123.static.snap.net.nz [123.255.31.237]) by viper.snap.net.nz (Postfix) with ESMTP id DB09E3DA06D; Wed, 20 Feb 2008 13:32:11 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 49CC28FC6D; Wed, 20 Feb 2008 13:30:23 +1300 (NZDT) In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.1.90.4 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:89629 Archived-At: > in any case, i *do* want to see pdb tracking included in whichever. > as the author of the feature, i should be able to authorize its use > wherever, and am frustrated with the twisty turns of events that have > prevented that. > > If you wrote the original version, we can install that > with papers from you alone. (Just say that you consider > it a change to Emacs and your assignment will cover it.) > > You could also give us any of your own subsequent changes. > > Then others (or you) could implement replacements for subsequent > improvements. As Ken is the author of these changes, has an assignment for Emacs and is keen to see them installed, to move things along I have installed them. My understanding is that the advantage of Pdbtrack is that you can start to debug on the fly. There's a small example attached below using a file called fibo.py (which I probably pinched from somewhere, but I can't remember where). However, as I've said before I'm not a Python programmer and Ken can probably explain better. Note that python-shell is similar to run-python and one should probably eventually subsume the other. So, all credit to Ken, complaints to me... no, what the heck, give Ken your grief too! More seriously, this is only on the trunk and I can always revert these changes if there are problems. Enjoy! Ken, Have you got write access yet? -- Nick http://www.inet.net.nz/~nickrob --------------------------------------- # Fibonacci numbers module (fibo.py) def fib (n): # write Fibonacci series up to n a, b = 0, 1 while b < n: print b, a, b = b, a+b def fib2 (n): # return Fibonacci series up to n result = [] a, b = 0, 1 while b < n: result.append (b) a, b = b, a+b return result --------------------------------------- Pdbtrack: M-x python-shell (note doesn't use run-python) Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pdb >>> import fibo >>> pdb.run ("fibo.fib(1000)") > (1)() (Pdb) b fibo.py:5 Breakpoint 1 at /home/nickrob/python/fibo.py:5 (Pdb) c > /home/nickrob/python/fibo.py(5)fib() -> while b < n: (Pdb) Source should appear in buffer with overlay arrow.