From m.n.andrews at biophysik.chemie.uni-dortmund.de Sun Mar 4 13:01:59 2007 From: m.n.andrews at biophysik.chemie.uni-dortmund.de (Maximilian N. Andrews) Date: Sun, 04 Mar 2007 13:01:59 +0100 Subject: [Python-mode] Tutorial on Python-Mode Message-ID: <45EAB537.90108@biophysik.chemie.uni-dortmund.de> Hello all, I've been using xemacs for many things, especially LaTeX, and I would like to start using it as an editor for python. Unfortunately I haven't found much documentation on python-mode. The only thing I found was on the book: GNU Emacs and XEmacs, by Larry Ayers, but it only scratches the surface of python-mode... Is there anyway I can find a tutorial or a few hints (well, maybe more than a few...) on how it works. Just to name a feature, what exactly does "Mark a Block" do? I would imagine it might behave like "Ctrl-", but on a block (i.e. if: else:, or something similar) Or another feature, "Ctrl-c !" I get an interpreter, and many new menus (i.e. Complete, In/Out, Signals). I'm a bit lost... I've been using Python only for scripting, but I'll probably have to start using it to analyze MD data from Gromacs. Thanks a lot! Best Regards, Maximilian -- University of Dortmund Department of Chemistry Physical Chemistry I - Biophysical Chemistry Otto-Hahn Str. 6 D-44227 Dortmund Germany Office: C1-06 room 176 Phone: +49 231 755 3916 Fax: +49 231 755 3901 From skip at pobox.com Fri Mar 9 20:01:50 2007 From: skip at pobox.com (skip at pobox.com) Date: Fri, 9 Mar 2007 13:01:50 -0600 Subject: [Python-mode] Tutorial on Python-Mode In-Reply-To: <45EAB537.90108@biophysik.chemie.uni-dortmund.de> References: <45EAB537.90108@biophysik.chemie.uni-dortmund.de> Message-ID: <17905.44830.312469.837081@montanaro.dyndns.org> Maximilian> I've been using xemacs for many things, especially LaTeX, Maximilian> and I would like to start using it as an editor for Maximilian> python. Unfortunately I haven't found much documentation on Maximilian> python-mode. I don't think there is anything separate from what you can get online. Maximilian> Is there anyway I can find a tutorial or a few hints (well, Maximilian> maybe more than a few...) on how it works. It's not all that different from other language programming modes. C-h m will give you some help about the mode-specific bindings. From there you can ask for help about specific commands, functions and variables. Maximilian> Just to name a feature, what exactly does "Mark a Block" do? It's bound to C-c C-k so type C-h k C-c C-k and you'll get the documentation for the py-mark-block command. Maximilian> Or another feature, "Ctrl-c !" I get an interpreter, and Maximilian> many new menus (i.e. Complete, In/Out, Signals). C-c ! runs the py-shell command which is a specialization of the normal shell mode. Again, C-h k C-c ! will display help about py-shell. Maximilian> I'm a bit lost... I've been using Python only for scripting, Maximilian> but I'll probably have to start using it to analyze MD data Maximilian> from Gromacs. I don't do anything with computational chemistry but I assume the field has plenty of very specialized wheels. I would be best if you could avoid reinventing them. You might want to plug into the SciPy community (http://www.scipy.org/). Also, I think Andrew Dalke (http://www.dalkescientific.com/) does a fair amount of computational chemistry and bioinformatics using Python. He might be a good source of pointers. -- Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/ "The hippies and the hipsters did some great stuff in the sixties, but the geeks pulled their weight too." -- Billy Bragg From barry at python.org Fri Mar 16 18:47:10 2007 From: barry at python.org (Barry Warsaw) Date: Fri, 16 Mar 2007 13:47:10 -0400 Subject: [Python-mode] cvs -> svn? Message-ID: <38587869-3649-45FF-A835-A74C3A67C16A@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have a patch to implement font-locking for Python 2.5's "with" statement, including the optional "as" keyword. However, I can't check it in because I keep getting prompted for a cvs password, which I don't have. What's odd is that I have everything set up correctly afaict to use svn on SF, but apparently cvs on SF is unhappy. So, I'm wondering if moving python-mode's repository over to svn would help, and whether anybody would mind if I did this. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRfrYH3EjvBPtnXfVAQIvygQAhf/1H8tgafV6Gd4cfkHnsHAph7Cd0u4U 5sP3jvLPQJbRK36rX01adjdd7zwSYKb/uzH7HAakL+PeAZWG4gJovOZsTlunw/bq wj8v0nC+afyDS1/YVneMxLrdoHdFIPFJtlsAAei+fyk6nJfBXf/IKHUm60mUQoD2 9rNScEIBZSM= =vafH -----END PGP SIGNATURE----- From skip at pobox.com Fri Mar 16 18:55:06 2007 From: skip at pobox.com (skip at pobox.com) Date: Fri, 16 Mar 2007 12:55:06 -0500 Subject: [Python-mode] cvs -> svn? In-Reply-To: <38587869-3649-45FF-A835-A74C3A67C16A@python.org> References: <38587869-3649-45FF-A835-A74C3A67C16A@python.org> Message-ID: <17914.55802.429269.112122@montanaro.dyndns.org> Barry> So, I'm wondering if moving python-mode's repository over to svn Barry> would help, and whether anybody would mind if I did this. Go for it. Skip From barry at python.org Fri Mar 16 23:35:31 2007 From: barry at python.org (Barry Warsaw) Date: Fri, 16 Mar 2007 18:35:31 -0400 Subject: [Python-mode] cvs -> svn? In-Reply-To: <17914.55802.429269.112122@montanaro.dyndns.org> References: <38587869-3649-45FF-A835-A74C3A67C16A@python.org> <17914.55802.429269.112122@montanaro.dyndns.org> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mar 16, 2007, at 1:55 PM, skip at pobox.com wrote: > > Barry> So, I'm wondering if moving python-mode's repository > over to svn > Barry> would help, and whether anybody would mind if I did this. > > Go for it. Done, and it does help. I've unchecked the CVS flag on the project page, but I don't think that actually removes any CVS data. It just disables the menu item. I just committed r426 which adds with-as font-locking. Please update your checkouts to use the SVN repository now. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRfsbtHEjvBPtnXfVAQIcZgP/SjSFLA6L93hy8bZ6jG/DaN2GLVQDUGrH cltfJ7RcKy7y1nn5PLNbS8/rshJWF4hV5YL2X0b1+9KQN7sgtjdNyAkkW4kWyyGc /KeNGbU1WViHlw8SbLu+ZFee7e35QKmpki2ITaUwF/W5uoWFi61JSZYv7C+ZX9zl 1MFpEqnHfxM= =8zeb -----END PGP SIGNATURE----- From barry at python.org Fri Mar 16 23:44:56 2007 From: barry at python.org (Barry Warsaw) Date: Fri, 16 Mar 2007 18:44:56 -0400 Subject: [Python-mode] FSFMacs python-mode (and Re: cvs -> svn?) In-Reply-To: References: <38587869-3649-45FF-A835-A74C3A67C16A@python.org> <17914.55802.429269.112122@montanaro.dyndns.org> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mar 16, 2007, at 6:35 PM, Barry Warsaw wrote: > I've unchecked the CVS flag on the project page, but I don't think > that actually removes any CVS data. It just disables the menu item. I realized that I can turn off CVS write access individually for all developers. I've done that now. BTW, should we care that FSFMacs comes with it's own python-mode that isn't related to ours? I'm a XEmacs user so I've never tried it, but it does seem silly to have two different versions of the same mode. Maybe I should rephrase that: do we care enough to do something about it? I'm not sure I do. ;) - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRfsd63EjvBPtnXfVAQKzHgP/WcuUUIF2PBImmmUPSm/6eOUm8bRG7ZZc aIfJMJ98N2kbdQc5Gpufvrm4udduRDjJhHlP9sDe0VGFi+pSDZDTxi2W7AtMQEEa qdIJgR0GqMFvAYY0I9QesR1uADeWmDtqayiO/oiHU56SZk7hrJj8nJ9F1BZy7Kqh O1YXM6Jry7E= =2k+c -----END PGP SIGNATURE----- From skip at pobox.com Sat Mar 17 20:35:15 2007 From: skip at pobox.com (skip at pobox.com) Date: Sat, 17 Mar 2007 14:35:15 -0500 Subject: [Python-mode] cvs -> svn? In-Reply-To: References: <38587869-3649-45FF-A835-A74C3A67C16A@python.org> <17914.55802.429269.112122@montanaro.dyndns.org> Message-ID: <17916.17139.305618.623778@montanaro.dyndns.org> Barry> I've unchecked the CVS flag on the project page, but I don't Barry> think that actually removes any CVS data. It just disables the Barry> menu item. Barry> I just committed r426 which adds with-as font-locking. Please Barry> update your checkouts to use the SVN repository now. I successfully checked the code out via svn. I tried to do a cvs diff in my old repository to see if I had any pending changes and got this error: % cvs diff ? python-mode-face-creation.patch cvs diff: failed to create lock directory for `/cvsroot/python-mode/python-mode' (/cvsroot/python-mode/python-mode/#cvs.lock): Permission denied cvs diff: failed to obtain dir lock in repository `/cvsroot/python-mode/python-mode' cvs [diff aborted]: read lock failed - giving up I don't know if that's a side effect of the change or not. If not, we should ask SF to fix the problem. If so, it would be nice if they at least retained read access to the repository for diffing. I'll just diff my CVS and SVN sandboxes. Can I assume r425 is the version at the point where you switched? Skip From ghn at blueyonder.co.uk Sat Mar 17 22:22:39 2007 From: ghn at blueyonder.co.uk (gary ball) Date: Sat, 17 Mar 2007 21:22:39 -0000 Subject: [Python-mode] e>mails Message-ID: <000c01c768da$7177bbe0$05f82052@gary3cffa64d9> stop sending me these e,mails. im gary not barry .stop it now will you ,its pissing me of}.... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-mode/attachments/20070317/9e9b051e/attachment.htm From barry at python.org Sun Mar 18 12:54:46 2007 From: barry at python.org (Barry Warsaw) Date: Sun, 18 Mar 2007 07:54:46 -0400 Subject: [Python-mode] cvs -> svn? In-Reply-To: <17916.17139.305618.623778@montanaro.dyndns.org> References: <38587869-3649-45FF-A835-A74C3A67C16A@python.org> <17914.55802.429269.112122@montanaro.dyndns.org> <17916.17139.305618.623778@montanaro.dyndns.org> Message-ID: <78E0F0A7-0B9B-4067-9825-2979159B0DB8@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mar 17, 2007, at 3:35 PM, skip at pobox.com wrote: > I successfully checked the code out via svn. I tried to do a cvs > diff in my > old repository to see if I had any pending changes and got this error: > > % cvs diff > ? python-mode-face-creation.patch > cvs diff: failed to create lock directory for `/cvsroot/python- > mode/python-mode' (/cvsroot/python-mode/python-mode/#cvs.lock): > Permission denied > cvs diff: failed to obtain dir lock in repository `/cvsroot/ > python-mode/python-mode' > cvs [diff aborted]: read lock failed - giving up > > I don't know if that's a side effect of the change or not. If not, we > should ask SF to fix the problem. If so, it would be nice if they > at least > retained read access to the repository for diffing. I'll just diff > my CVS > and SVN sandboxes. Can I assume r425 is the version at the point > where you > switched? It could very well be an artifact of my turning off write access. I'm just guess, but maybe you need write access if you have a writable checkout and try to do a diff (because CVS wants to create a lock in the repository in that case). You could try enabling your write access to do the diff and see if that helps. There's only a handful of us that have developer privs on the project, so I'm not /too/ concerned about accidental CVS commits. I just did it so an accidental commit would let you know to switch to svn, but I guess it messes up this case too. Yep r425 was the switch point. Cheers, - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRf0ojHEjvBPtnXfVAQLjYAP7BpSV9g3bqvefIpMEXrtAUIc54XtSsopX 6s6YPFdOwjVMHKbgkpx/3/RWF9cVv4aHT92h6pfL/q5Gj+vcztQAKOzaDISlC6lC o2eo50Wn6rJNyVG6l/CKbFikBj0ojF1dJn01fJk9COUY3Jy3vD8uaZHHeysOvdPk lmliw0b7RJY= =88N5 -----END PGP SIGNATURE----- From ghn at blueyonder.co.uk Sun Mar 18 16:24:22 2007 From: ghn at blueyonder.co.uk (gary ball) Date: Sun, 18 Mar 2007 15:24:22 -0000 Subject: [Python-mode] stop emailing me Message-ID: <000c01c76971$8d36fac0$05f82052@gary3cffa64d9> ive had enought of u twats talkin shit on my e . mails .piss off -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-mode/attachments/20070318/c451901b/attachment.htm From barry at python.org Mon Mar 19 20:31:50 2007 From: barry at python.org (Barry Warsaw) Date: Mon, 19 Mar 2007 15:31:50 -0400 Subject: [Python-mode] stop emailing me In-Reply-To: <000c01c76971$8d36fac0$05f82052@gary3cffa64d9> References: <000c01c76971$8d36fac0$05f82052@gary3cffa64d9> Message-ID: <73A1F0F7-464F-41C6-A10B-14BDE569C3AA@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mar 18, 2007, at 11:24 AM, gary ball wrote: > ive had enought of u twats talkin shit on my e . mails .piss off Thanks for your kind words. We appreciate your intelligent contributions to the development of python-mode, but we respect your decision to unsubscribe from the list. You have been removed. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRf7lJ3EjvBPtnXfVAQJU0QQAgG814biVpWg79UuDIxlhxOwcnUga3sbk S+Rcp7Et/E9vDBgmdMz0c0lGRSOZoXcmyyB0gZUm9HGhlwef+N+tzJDCdukKDR7u 8rtd7hzCHcnwDmDS1IU1xOyU3b6LHKqezvEZ7Xv9vRTouEc7BYqzAv+M36Nprbwe vRkbjQuCZ/Y= =wVYt -----END PGP SIGNATURE----- From noreply at sourceforge.net Wed Mar 28 06:50:24 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 27 Mar 2007 21:50:24 -0700 Subject: [Python-mode] [ python-mode-Patches-1023335 ] Handle triple-quoted strings correctly. Message-ID: Patches item #1023335, was opened at 2004-09-06 17:22 Message generated for change (Comment added) made by glasserc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1023335&group_id=86916 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Edward Loper (edloper) Assigned to: Edward Loper (edloper) Summary: Handle triple-quoted strings correctly. Initial Comment: This patch adds an option that will color triple-quoted strings correctly. It works by turning off syntax-highlighting for strings and comments (by registering quotes and hashes in the syntax table as normal punctuation); and using a fairly advanced keyword matcher to find all strings and comments. The keyword matcher uses a text- property to keep track of the syntax category of each character, and only updates it as needed. Therefore, the option can only be used if text-properties are available (but they are available on all current versions of emacs, as far as I know). Caveat: it's possible that this will be slow on some machines, or under certian circumstances. But it's not noticably slower on the machines & files I've tested it on. ---------------------------------------------------------------------- Comment By: Ethan Glasser-Camp (glasserc) Date: 2007-03-27 23:50 Message: Logged In: YES user_id=270121 Originator: NO I tried this on XEmacs and it worked fine so far as I could tell. Thanks a ton! XEmacs 21.4 (patch 20) "Double Solitaire" [Lucid] (i486-linux-gnu, Mule) of Sun Mar 25 2007 on penell Ethan ---------------------------------------------------------------------- Comment By: Edward Loper (edloper) Date: 2006-03-11 01:07 Message: Logged In: YES user_id=195958 I have attached a new version of the patch, which should hopefully address both Skip's issue, and the problem that Johannes Gijsbers pointed out. I'd appreciate it if several people could try it out (preferably on both emacs and xemacs), and let me know if it works. danielx_: download the patch file (handle-tqs-v2.diff) at the bottom of this page, and run "patch python-mode.el handle-tqs-v2.diff". The changes I made were: - removed (require 'text-properties), since 'text- properties isn't defined as a feature in emacs; and it should be available by default in both xemacs and emacs, anyway. - Replaced calls to "replace-regexp-in-string" with a compatibility function "py-replace-regexp-in-string", since the former is only available on xemacs. - Fixed a bug in the regexp used to find the end of comments (this was what caused problems in BaseHTTPServer.py). ---------------------------------------------------------------------- Comment By: Daniel (danielx_) Date: 2005-11-19 18:43 Message: Logged In: YES user_id=1383230 Sorry, how do I install this? I'm using python-mode ver1.0alpha, found on the "Files" page. ---------------------------------------------------------------------- Comment By: Skip Montanaro (montanaro) Date: 2005-06-04 15:46 Message: Logged In: YES user_id=44345 Ed, this looks like this would be a good addition, but there are some problems. Is there any resolution to Johannes' note about comment breakage? I just patched my copy of python-mode.el. When I visit a .py file it complains that it can't find the text-properties package. (This is XEmacs 21.4.15.) I didn't see anything like text-properties or properties in the package list. ---------------------------------------------------------------------- Comment By: Johannes Gijsbers (jlgijsbers) Date: 2004-11-01 11:15 Message: Logged In: YES user_id=469548 I applied this patch to the latest python-mode and while triple-quoted-strings mostly work fine (thank you! thank you! thank you!), comments seem to be a bit broken. Take a look at BaseHTTPServer.py from the Python CVS for a particularly bad example. I'm running "GNU Emacs 21.3.50.1 (i386-pc-linux-gnu, GTK+ Version 2.4.10) of 2004-10-11 on surfboy, modified by Debian", compiled from Emacs CVS using the emacs-snapshot package. ---------------------------------------------------------------------- Comment By: Edward Loper (edloper) Date: 2004-09-06 21:15 Message: Logged In: YES user_id=195958 So I did. Trying again. ---------------------------------------------------------------------- Comment By: Skip Montanaro (montanaro) Date: 2004-09-06 20:41 Message: Logged In: YES user_id=44345 Edward, perhaps you forgot to check the box when uploading the patch? There's nothing currently attached to this item. -Skip ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1023335&group_id=86916