I found this recipe quite related <div><br></div><div><div><a href="http://code.activestate.com/recipes/198078/">http://code.activestate.com/recipes/198078/</a></div><div><br></div><div>it logs all methods calls with their parameters and return values.. Can this be modified to include any other outputs of the module, which are not specified with the return statement.</div>
<div><br></div><div>cheers</div><div><br></div><div><br><br><div class="gmail_quote">On Fri, Sep 17, 2010 at 6:47 PM, Alan Gauld <span dir="ltr">&lt;<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">&quot;Jojo Mwebaze&quot; &lt;<a href="mailto:jojo.mwebaze@gmail.com" target="_blank">jojo.mwebaze@gmail.com</a>&gt; wrote<br>

<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
My applogies to begin with,  it seems i didnt state my problem clearly for<br>
this particular case - perharps I/O was not the best way to describe my<br>
problem.<br>
</blockquote>
<br></div>
Hmmm, perhaps not! :-)<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Specifically, i would like to track all inputs/output to modules/functions -<br>
if a module  retrieved and used files and run some analysis on them and<br>
produced other files in return, i would like to take not of this. i.e what i<br>
want is to recored input and outputs to a module. and also to record all<br>
paramaters, attribute vaules used by the same module.<br>
</blockquote>
<br></div>
You could do some of that with static code analysis I think.<br>
And while I&#39;m sure you could do this by delving into the innards of<br>
Python it will be a lot of work and I&#39;m not sure what the impact<br>
would be on the performance of your code.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I thought i would build a wrapper around the orignial python program or<br>
probably pick this information at OS level.<br>
</blockquote>
<br></div>
I don&#39;t think the OS will have much of what you want you will need to<br>
look inside Python itself I think. It might be best to tweak the interpreter<br>
to trap those details but that would need to be done in C. And it would<br>
slow the interpreter down for everything.<br>
<br>
The OS knows how your app is interacting with the network and file<br>
system but it doesn&#39;t know about the interactons between modules<br>
inside Python. Maybe there are some of the more obscure modules<br>
in the standard library that allow monitoring. The debug and profiling<br>
modules might yield clues too.<br>
<br>
An interesting challenge and I&#39;m not sure how I&#39;d go about it myself.<br>
Might be a good one to try on the main comp.lang.python list, its<br>
certainly not typical newbie stuff!<br>
<br>
Alan G. <br><div><div></div><div class="h5">
<br>
_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org" target="_blank">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</div></div></blockquote></div><br></div></div>