[Zope] The zope way to do it
Ragnar Beer
rbeer@uni-goettingen.de
Tue, 1 Feb 2000 21:01:24 +0100
I started playing with external methods, because I have to display
quite complex data (stored in dictionaries of lists of dictionaries)
that differs on a per directory basis.
In plain python I'd put all the functions I need in a file like this
one, called test_aux.py
--------------------------------------------
def display(text):
result=''
for word in text:
result= result + word + ' '
return result
--------------------------------------------
then I'd create another file that imports display from test_aux.py
and uses it, say test.py:
--------------------------------------------
from test_aux import display
print display(['This','is','a','very','simple','example.'])
--------------------------------------------
and the run it with 'python test.py'
What's the python way to do this?
Ragnar