[Zope-dev] zshell used without jaxml
vio
vmilitaru@sympatico.ca
Fri, 3 Aug 2001 03:45:23 -0500
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
############## ... that's the whole point.
def myStuff(self, id, title, REQUEST=None):
my_zshellscript = ['mkdir myFolderName', 'cd myFolderName', 'pwd']
# my problem in previous line,
# although that's exactly how it looks in 'REQUEST'
myShell = ZopeShell(my_zshellscript)
# get some feedback
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