[Zope] Calling PythonMethods from PythonMethods.

Luis Cortes lcortes@pollak.com
Fri, 26 May 2000 11:16:42 -0600


On Fri, 26 May 2000, you wrote:

I think he is talking about the ZOPE product PythonMethods which should work
with the self.

If you have a  PythonMethod foo1 and you need to call it from foo2 make sure
that foo2 has a self variable defined as the first variable in your parameter
list.

then in foo2 you can do this:

	self.foo1()

with the appropriate arguments if  any ( of course ).

regards,
Luis.




>> Steve Drees wrote:
>> 
>> > How does one do this?
>> 
>> Suppose you have a file, test.py, and in it you have a method
>> 
>> def printHere():
>>     print 'Here'
>> 
>> Suppose also that you wish to call that method from another file,
>> SecondFile.py. In SecondFile.py:
>> 
>> import test
>> 
>> test.printHere()
>> 
>> ciao
>> 
>> DR
>> 
>> 
>> _______________________________________________
>> Zope maillist  -  Zope@zope.org
>> http://lists.zope.org/mailman/listinfo/zope
>> **   No cross posts or HTML encoding!  **
>> (Related lists - 
>>  http://lists.zope.org/mailman/listinfo/zope-announce
>>  http://lists.zope.org/mailman/listinfo/zope-dev )