Have the Zope with scripts module ?
Hello ! I be used to modular programming. Units/Modules/Classes. In Zope can I create a module with some functions ? How can I do it ? Or I need to be create Product for this ? How ? (The ugly solution is this): script: parameters if params[0]=0 : ... r=params[1]+params[2] ... if params[0]=1 : ... r=SetURLTo(params[1]) ... if params[0]=2 : ... if params[0]=3 : ... return(r) Thanx -- Best regards, fowlertrainer mailto:fowlertrainer@anonym.hu
<snip>
Hello !
I be used to modular programming. Units/Modules/Classes.
In Zope can I create a module with some functions ?
How can I do it ?
Or I need to be create Product for this ? How ?
If you want to do modular programming try using python in an external method (search for external method in the archives and have a look at the zope manual) Jonathan
fowlertrainer@anonym.hu wrote:
In Zope can I create a module with some functions ?
How can I do it ?
In current Zope you may emulate a module with functions through a folder with Python scripts (and/or other sorts of Zope methods/objects.) You cannot define classes here, however.
Or I need to be create Product for this ? How ?
That's probably best. In a recent thread is a bunch of links about this. --jcc -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."
fowlertrainer@anonym.hu wrote at 2003-12-12 10:07 +0100:
I be used to modular programming. Units/Modules/Classes.
In Zope can I create a module with some functions ?
When you care to look at Zope's source, you can find the answer yourself. Of course, it is yes.
How can I do it ?
The easiest way is a folder (used as a module) with templates, scripts, images, whatever... One way are ZClasses (--> Zope Book). One way are External Methods (--> Zope Book) One way are Python modules with function definitions (--> Python documentation) declared as importable (--> "README.txt" of "Products/PythonScripts).
Or I need to be create Product for this ? How ?
Read the Zope Developper Guide (--> Zope.org). -- Dieter
On Friday 12 December 2003 01:56 pm, Dieter Maurer wrote:
fowlertrainer@anonym.hu wrote at 2003-12-12 10:07 +0100:
In Zope can I create a module with some functions ?
When you care to look at Zope's source, you can find the answer yourself. Of course, it is yes.
How can I do it ?
Or I need to be create Product for this ? How ?
Somebody was working on this already, IIRC: a Python script-like object that was more like a regular Python module. Maybe PythonLibrary? You might want to run a search on the list archive. This was a couple of months back. I can't remember if it was just a proposal, or a working product, nor who wrote about it. But it was here that I heard it. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
participants (5)
-
Dieter Maurer -
fowlertrainerļ¼ anonym.hu -
J. Cameron Cooper -
Small Business Services -
Terry Hancock