Defining a code object from a function
Neil Benn
neil.benn at cambridgeantibody.com
Thu Apr 5 11:35:04 EDT 2001
Hello,
I have a class as follows:-
class plate:
NoColumns = 0
NoRows = 0
currentRow = 0
def __init__(self):
print "creating plate"
print "created plate"
def hasMoreRows(self):
if currentRow < noRows:
return 1ist
else:
return 0
def nextRow(self):
self.currentRow = self.currentRow + 1
return self.currentRow
I'm using the inspect module to get information about the method
arguments back.
However...................
My problem is that the getargs methods of inspect want a code object.
Looking through the docs on Python.org I can't work out how to convert a
method call to a code object so that I can then get the arguments back.
Please could someone advise me, pretty please?
Cheers,
Neil Benn
Automation Informatics Scientist
CaT
More information about the Python-list
mailing list