[Zope] Limits of External Methods

Ed Leafe ed@leafe.com
Thu, 20 Feb 2003 10:57:17 -0500


	If I define a class in an external method, how can I expose it so that 
my Zope python scripts can access it? The only solution I've found is 
something like this:

class Foo():
	def method1(self, parms)
		...
	def method2(self, parms)
		...

def newFoo()
	return Foo()

def fooMethod1(oFoo, parms)
	return oFoo.method1(parms)

	... and so forth. I then need to add separate External Methods for 
newFoo(), fooMethod1(), etc.  Is there any way once I have a reference 
to an instance of Foo, that I can call its methods directly? Or is this 
simply not possible in Zope?

      ___/
     /
    __/
   /
  ____/
  Ed Leafe
  http://leafe.com/
  http://opentech.leafe.com