Zope ZClass & Namespace

Harald Stowasser Stowasser.h at idowa.de
Wed Jan 3 09:54:31 EST 2001


First of all, hello to all who read this.

Im new in this group, so feel free to tell me if im dooing something
wrong ;-)

So now to my problem. I have a Apache-Server with ZOPE and want to write
some ZClasses in PythonMethod's. Now i got a problem with the propertys
where my method is in.

I wan't to write into the property by my Python-programm but this don't
work.

my code:

/______ ZOPE (dtml):

<dtml-with Redaktion>
  <p>Ort= <dtml-var Ort></p>
  <dtml-var "TestPython(Redaktion)">
  <p>Ort= <dtml-var Ort></p>
</dtml-with>

/______ Redaktion-Objekt:

test="P" + self.Ort + "P"
  ---> self.Ort = test <--- DONT WORK
return test

brings the error:
  Error Type: Python Method Error
  Error Value: Forbidden operation STORE_ATTR at line 3

So you see if the property Ort is "THING"
then should apear:

THING
PTHINGP
PTHINGP

If i delete the marked line my Progamm works, but it brings me this:

THING
PTHINGP
THING

( Of course )

Why i can not write into the variable ?

P.S. sorry for my bad english.



More information about the Python-list mailing list