trapping all method calls in a class...

2008-12-20 Thread Piyush Anonymous
hi, i need to trap all method calls in a class in order to update a counter which is increased whenever a method is called and decreased whenever method returns. in order to that i am trying to write a decorator for all the methods. see the code here with error. --- http://codepad.org/2w7JVvDB

a small doubt

2008-12-20 Thread Piyush Anonymous
i wrote this code -- class Person(object): instancesCount = 0 def __init__(self, title=""): Person.instancesCount += 1 self.id = "tempst" def testprint(self): print "blah blah" def __getattribute__(self, name): print "in get attribute" a = Person() a

finding the difference between the two version of the python program...

2008-12-01 Thread Piyush Anonymous
is there a tool which, given two version of programs, finds the difference like set of classes added, deleted and modified? assuming the python program is written in oops way. -- http://mail.python.org/mailman/listinfo/python-list

Dynamically adding methods to a class...

2008-07-28 Thread Piyush Anonymous
class MyObject: def __init__(self, name): self.name = name def do_this_default(self): print "default do_this implementation for %s" % self.name def custom_do_this(): #method to be added print "custom do_this implementation for %s" % self.name def funcToMethod(func,clas,metho

Re: sending executable data over network..

2008-06-24 Thread Piyush Anonymous
re? should i change the way i am receiving the code? thanks for help -piyush On Wed, Jun 25, 2008 at 12:22 AM, Terry Reedy <[EMAIL PROTECTED]> wrote: > > > Piyush Anonymous wrote: > >> any idea or pointer how i could link it to running code in server? >> for exam

Re: sending executable data over network..

2008-06-24 Thread Piyush Anonymous
objectA.getdata()=getdatanew() here? On Tue, Jun 24, 2008 at 4:15 PM, Cédric Lucantis <[EMAIL PROTECTED]> wrote: > Le Tuesday 24 June 2008 08:59:40 Piyush Anonymous, vous avez écrit : > > hi, > > i wish to change the way the function definition at run time in a running > > server.

sending executable data over network..

2008-06-24 Thread Piyush Anonymous
hi, i wish to change the way the function definition at run time in a running server. new function code which is to be executed is provided by a client at different location. i am getting it by reading a file and sending it using makefile() with server/client connected using sockets. how can make