how to comment lot of lines in python

Kent Johnson kent at kentsjohnson.com
Mon Apr 3 09:33:00 EDT 2006


Rick Zantow wrote:
> Kent Johnson <kent at kentsjohnson.com> wrote in news:44310867$1_1
> @newspeer2.tds.net:
> 
>> Sion Arrowsmith wrote:
>>> Out of curiousity, is there a modern editor which *doesn't* allow you
>>> to comment/uncomment a selected bunch of lines of code?
>>>
>> TextPad is my editor of choice but it doesn't have this feature.
>>
> 
> I use TextPad all the time, and while it is true that the feature is not 
> built in, it's misleading to say it doesn't have it. It is implemented by 
> means of a macro definition. I assign a key to a 'comment' macro (basically 
> replacing regex ^ with '# ' for the selected text) to do this. And of 
> course I have a reciprocal 'uncomment' macro as well.

Thank you! I don't suppose you have any tricks to make it work with 
UTF-8 data outside the cp1252 character set, do you?

Kent



More information about the Python-list mailing list