Accessing the subfolders in zope
Hi all I need some advice as to how i access the subfolder of a folder. This is my code so far but i seem to be stuck. any help appreciated. I have a folder called eSessions and under which i have created another folder (say xyz) which i am passing as a parameter to this python script. My aim is to access that subfolder and add a property as shown below but i am confused how to access this xyz subfolder ??? The fname varialbe is passed with xyz in it as an argument. container.fname.addProperty('memberid',1,int) (this line gives me a problem) print propertyItems return printed thanks bobby
Hi Bobby, If the subfolder is not in the acquisition path of the script your line would give a problem. Why not just use?: fname.addProperty(...) This assumes that fname has been declared an argument of your script. On Thu, May 24, 2001 at 08:56:23PM +0530, Bobby Mathew wrote:
Hi all I need some advice as to how i access the subfolder of a folder. This is my code so far but i seem to be stuck. any help appreciated. I have a folder called eSessions and under which i have created another folder (say xyz) which i am passing as a parameter to this python script. My aim is to access that subfolder and add a property as shown below but i am confused how to access this xyz subfolder ??? The fname varialbe is passed with xyz in it as an argument.
container.fname.addProperty('memberid',1,int) (this line gives me a problem) print propertyItems return printed
thanks bobby
-- ------------------------------------------------------ Andres Corrada-Emmanuel Email: andres@corrada.com Internet Programming http://www.mamey.com ------------------------------------------------------
Bobby Mathew wrote:
Hi all I need some advice as to how i access the subfolder of a folder. This is my code so far but i seem to be stuck. any help appreciated. I have a folder called eSessions and under which i have created another folder (say xyz) which i am passing as a parameter to this python script. My aim is to access that subfolder and add a property as shown below but i am confused how to access this xyz subfolder ??? The fname varialbe is passed with xyz in it as an argument.
container.fname.addProperty('memberid',1,int) (this line gives me a problem) print propertyItems return printed
thanks bobby
try: container[fname].addProperty('memberid',1,'int') Folders act like python dictionaries for subobject lookups. BTW: Please don't post HTML messages to the list. Most people will just ignore them. hth -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
participants (3)
-
andres@corrada.com -
Bobby Mathew -
Casey Duncan