About gmon.out for profiling

2011-03-24 Thread Baskaran Sankaran
Hi, I have two questions regarding the profiling. My python version automatically generates gmon.out for every script that I run and so I guess that it must have been compiled with the appropriate option. Firstly, it is not clear to me how I can use this. I've used python with -cprofile switch an

Fwd: Calling a method from invoking module

2010-10-28 Thread Baskaran Sankaran
Sorry for the confusion; fooz(), track() and barz() are all members of their respective classes. I must have missed the self argument while creating the synthetic example. Yeah, I realize the mutual import is a bad idea. So, if I merge them into a single module (but still retaining the two classes

Calling a method from invoking module

2010-10-28 Thread Baskaran Sankaran
Hi, I have two classes in separate python modules and I need to access some methods of the either classes from the other. They are not in base and derived class relationship. Please see the example below. Foo imports Bar and inside the Foo class it creates a Bar obj and then calls Bar.barz(). Now