[Tutor] parsing pyc files

Jojo Mwebaze jojo.mwebaze at gmail.com
Tue Mar 23 12:01:11 CET 2010


Researchers at our university are allowed to checkout code from CVS, make
modifications, change variables/parameters and run experiments.. After
experiments are run, results are published. (However we don't allow them to
commit the changes, till changes are approved)

take an example, two researchers can run two experiments on the same data
set but get different results depending on what someone did/changed.

So the problem is how to compare both results, We need to know how the
results were generated. e.g methods invoked, parameters/variables passed to
that method, and probably changes made to the classes and probably store
this information as part of the data.

cheers

Jojo

On Tue, Mar 23, 2010 at 10:27 AM, Alan Gauld <alan.gauld at btinternet.com>wrote:

>
> "Jojo Mwebaze" <jojo.mwebaze at gmail.com> wrote
>
>
>  How is possible to trace the all method calls, object instantiations,
>> variables used in running an experiment dynamically,  without putting
>> print
>> - or log statements in my code?  - some sort of provenance!
>>
>
> There are several debuggers for Python including the pdb
> module in the standard library and the "graphical" one in IDLE.
>
>
>  I would like to create a tool that can look into pyc files to find
>> classes/methods that was executed without looking the the source code. Is
>> this possible in python.
>>
>
> I don't know of a debugger for the bytecode.
> There are tools to generate it for a specific function so you can
> see what it looks like, but I don't know of any that can dynamically
> monitor execution.
>
> The profiler can also tell you what was executed after the fact.
>
> This is an unusual request can I ask why you need to do that?
>
> --
> Alan Gauld
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100323/3ae7e773/attachment.html>


More information about the Tutor mailing list