[Zope] Calling PythonMethods from PythonMethods.

2000-05-25 Thread Steve Drees

How does one do this?



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Calling PythonMethods from PythonMethods.

2000-05-26 Thread Dan Rusch




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  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Calling PythonMethods from PythonMethods.

2000-05-26 Thread Luis Cortes

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  -  [EMAIL PROTECTED]
>> 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 )

___
Zope maillist  -  [EMAIL PROTECTED]
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 )