Good morning (to those of you in my general part of the world). I have a question I haven't been able to find the answer to in any documentation. I'm creating a little script that will create 'Folder' items for user to put stuff in. I need to be able to set the "path" dynamically. What I have is: context.web.users.usertitle.manage_addFolder(courseNumber, courseTitle) I need to be able to set the item 'usertitle' dynamically (ie. from a parameter on a form). Or even better be able to construct a string something like. . .pathString = "context.web.users." + userTitleVar, then pathString.manage_addFolder. . . . Any help on figuring a way to do something like this would be very much appreciated, if I had hair, I'd be pulling the last few out. Thanks in advance, G
Gerald D. Anderson wrote at 2003-1-17 08:28 -0600:
Good morning (to those of you in my general part of the world). I have a question I haven't been able to find the answer to in any documentation. I'm creating a little script that will create 'Folder' items for user to put stuff in. I need to be able to set the "path" dynamically. What I have is:
context.web.users.usertitle.manage_addFolder(courseNumber, courseTitle) You are interested in "Computed attribute access". You use "getattr" for this.
More information: <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> Dieter
participants (2)
-
Dieter Maurer -
Gerald D. Anderson