[Zope] newbie, setting member properties in python

Andreas Jung lists at andreas-jung.com
Sat Apr 9 13:24:51 EDT 2005



--On Samstag, 9. April 2005 12:50 Uhr -0400 Dan E <dane1979 at gmail.com> 
wrote:



> I am trying to create a simple script that loops through the member
> properties and sets certain boolean ones to a certain value (which I
> have acquired). I realize I am probably making a simple mistake but
> the following snippet of code doesn't seem to set the member I am
> interested in. Any help would be appreciated.
>
> p_index =-1
> for p in memberProperties:
>     p_index = p_index+1
>     curr_value = cb_array[p_index]
>     if p[0] == i  #(checking for properties beginning with an i but
> could be any check)
>         member.setProperties(p=curr_value);

Your code looks strange and incomplete. Where is 'memberProperties'?
What is 'cb_array'? Where does it come from? The check p[0] against 'i'
What is 'i'? Is it a variable? Trying to compare against the character 'i'?
Please try to post questions with somewhat complete and understandable code.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050409/d1fc6968/attachment.bin


More information about the Zope mailing list