Re: Python Runtime Method Call Binding

2008-12-04 Thread k3xji
Thanks for the tips. >3/ Now fact is that even all this won't probably be enough to implement >a robust generic profiler - something which obviously requires a deep >understanding of the language *and* it's implementation. Indeed. Maybe not generic,but with these information at least I can write

Re: Python Runtime Method Call Binding

2008-12-04 Thread Bruno Desthuilliers
k3xji a écrit : test failed !-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Runtime Method Call Binding

2008-12-04 Thread Bruno Desthuilliers
k3xji a écrit : (snip) My problem is that I have a very-multithreaded application that I want to profile dynamically. And I want to see how many functions are called/how much time spent on them.(I tried Profilers but lack of multithreading support I cannot do what I want to do.) ??? I didn't f

Re: Python Runtime Method Call Binding

2008-12-04 Thread k3xji
test -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Runtime Method Call Binding

2008-12-04 Thread k3xji
On Dec 4, 5:48 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Thu, 04 Dec 2008 06:23:28 -0800, k3xji wrote: > > Hi, > > > Is there a way to hook a function call in python? I know __getattr__ is > > doing for variables, > > What do you mean "variables"? Do you mean attributes

Re: Python Runtime Method Call Binding

2008-12-04 Thread Steven D'Aprano
On Thu, 04 Dec 2008 06:23:28 -0800, k3xji wrote: > Hi, > > Is there a way to hook a function call in python? I know __getattr__ is > doing for variables, What do you mean "variables"? Do you mean attributes? > it is giving us a chance before a field is > initialized. What field? Is a field

Re: Python Runtime Method Call Binding

2008-12-04 Thread Diez B. Roggisch
k3xji wrote: > Hi, > > Is there a way to hook a function call in python? I know __getattr__ > is doing for variables, it is giving us a chance before a field is > initialized. Do we have same functionality for methods? > > Example: > > class Foo(object): > def __call_method__(self, ...) # j

Re: Python Runtime Method Call Binding

2008-12-04 Thread Bruno Desthuilliers
k3xji a écrit : Hi, Is there a way to hook a function call in python? I know __getattr__ is doing for variables, it is giving us a chance before a field is initialized. Note that since the introduction of the "new-style" object model - that is, in Python 2.2 -, computed attributes are better

Python Runtime Method Call Binding

2008-12-04 Thread k3xji
Hi, Is there a way to hook a function call in python? I know __getattr__ is doing for variables, it is giving us a chance before a field is initialized. Do we have same functionality for methods? Example: class Foo(object): def __call_method__(self, ...) # just pseudo print 'A method