zshell as wrapper to Zope method calls
Is the "programmatical" use of zshell documented somewhere? I see that it has provisions to get commands either from the web (from 'REQUEST') or from 'parameters'. But I can't figure out how to send it my parameters. I'm guessing the key is through 'zshellscript'. But I can't seem to get the syntax right. Could someone care to give me an example. Or correct mine: ------- from zshell import ZopeShell # import jaxml <-- I am specifically not importing jaxml, because I don't want the UI part def myStuff(self, id, title, REQUEST=None): my_zshellscript = ['mkdir myFolderName', 'cd myFolderName', 'pwd'] # <-- problem here, although that's #exactly how it looks in 'REQUEST' myShell = ZopeShell(my_zshellscript) return Globals.MessageDialog( message=(myShell), action='manage_main', ) <-- this should return 'myFolderName' ------- A less important zshell-related question: where is 'context' documented? (Where does it come from? What is it used for? The ID of the working folder? (as in 'zshellpwd'). What's the difference between it and ''__context' ?) Regards - Vio
Hi, On Fri, Aug 03, 2001 at 03:13:23AM -0400, vio wrote:
Is the "programmatical" use of zshell documented somewhere? I see that it has provisions to get commands either from the web (from 'REQUEST') or from 'parameters'. But I can't figure out how to send it my parameters. I'm guessing the key is through 'zshellscript'. But I can't seem to get the syntax right.
This part doesn't work yet, in fact it works for me but breaks for most people. I don't know why yet, so I've disabled it IIRC.
A less important zshell-related question: where is 'context' documented? (Where does it come from? What is it used for? The ID of the working folder?
not the ID, but the current folder itself. anyway expect a new release as soon as I've got the time to "productify" it, so you'll be able to add zshell scripts all over the place, and directly call their methods. bye, Jerome "Mieux vaut tard que jamais" Alet
participants (2)
-
Jerome Alet -
vio