Commenting out multiple lines ?

Roman Suzi rnd at onego.ru
Wed May 16 02:24:43 EDT 2001


On Wed, 16 May 2001, Courageous wrote:

> On Tue, 15 May 2001 22:46:18 +0200, "Tom" <tom at peresys.co.za> wrote:
> 
> >I miss C style comments for multiple lines like /* */
> >
> >How can that be done without doing
> >
> >#line 1
> >#line 2
> >#line 3
> >#line 4
> >
> >in Python ?
> 
> If the triple quote comment technique doesn't work for you,
> you might look up the boxes program on the web:
> 
> http://www6.informatik.uni-erlangen.de/~tsjensen/software/boxes/
> 
> I use this in conjunction with vim; you select an area, hit a key
> sequence, and the entire area either comments or uncomments
> python-style.
> 
> C//

If you use Emacs and python-mode you can easily comment out 
sections of code by C-c #

## from pprint import pprint
## from xml.dom import minidom as mdom

## print "dir(mymodule1):", pprint(dir(mymodule1))
## print "1:", split("1,2,3", ","), resplit(",", "1,2,3"),

and uncomment by C-u C-c #

In IDLE there is a menu for doing same.


Sincerely yours, Roman A.Suzi
-- 
 - Petrozavodsk - Karelia - Russia - mailto:rnd at onego.ru -
 





More information about the Python-list mailing list