[Tutor] suggestion for an editor

Walter Prins wprins at gmail.com
Fri Jul 20 15:37:09 CEST 2012


On 20 July 2012 14:07, Wayne Werner <wayne at waynewerner.com> wrote:
>>> At present i write programs using vi editor. I am interested to change to
>>> something else. My specific need is that i want to select a portion/small
>>> segment of my program (for eg. a nested loop) and then monitor processing
>>> time it takes for that portion while i run the program. By this i hope to
>>> find the segment that takes time and modify to achieve better speed. Can
>>> someone please share their experience.
>>
>> I don't think that what you want exists. As far as I know, even
>> full-featured IDEs (Integrated Development Environments) don't include
>> profiling of selected sections of code.
>
> But you could also write a fairly simple Python script to do that for you,
> without any type of IDE integration.

Your comment made me think that perhaps there's a decorator for this
type of thing, so I googled it and and it turns out there is:
http://mg.pov.lt/profilehooks/

More ideas in a similar vein:
http://stackoverflow.com/questions/5375624/a-decorator-that-profiles-a-method-call-and-logs-the-profiling-result
http://code.activestate.com/recipes/577817-profile-decorator/

HTH,

Walter


More information about the Tutor mailing list