Re: Couple of questions...
Sebastien Bigaret <[email protected]> 27 Apr 2004 20:52:36 +0200
| Newsgroups | gmane.comp.python.modeling |
|---|---|
| Message-ID | <[email protected]> |
Hi Aaron,
"Aaron Freeman" <[email protected]> writes:
> First, thank you all for the fast and details replies; they are much
> appreciated. ;-)
>
> I've been playing around with the code that was posted, and while I still
> don't have it working, it is getting closer.
>
I'm sorry, I assumed py2.2+, not py2.1
We definitely still support py2.1, but of course then some of the
features are not available. For example, there's nothing like properties
in py2.1.
The code I posted should work given that:
- you replace p.bizname="x" w/ p.setBizname("o") and
p.bizname w/ the appropriate getter p.getBizname()
(this will make the ValidationException at saveChanges() disappear)
- you build the package/modules/classes w/:
>>> build(model, define_properties=0)
since py2.1 has no properties.
And that's obviously what you discovered on your own.
> 1) Based on some archived posts, I was under the impression that Modeling
> core supports Python 2.1 (I am using 2.1.3 since this is leading up to a
> Zope 2.6.4 product); is that still true?
To be clear: yes, it is.
> 2) Do I need the Modeling.dynamic module? This appears to require python
> 2.2, but if the classes are being generated via an XML file or the ZModeler
> tool, this shouldn't be required, right?
You absolutely do not need too, right. I just use it (even though it's
not documented yet) since most people tends to think its the easiest way
(including me :) --but that does not mean that code generation, either
from the ZModeler or from mdl_generate_python_code.py, is deprecated.
-- Sébastien.
-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg297