[Zope] [ANNOUNCE] The Grand Unification Theory of ZShell Scripts
Jerome Alet
alet@librelogiciel.com
Tue, 29 Oct 2002 22:07:40 +0100
Hi,
I'm pleased to announce the preview version of ZShellScripts v0.1
ZShellScripts is currently distributed under the GNU GPL, but
I may change the license if sufficient interest in this
product is reported...
Download ZShellScripts v0.1 from :
http://www.librelogiciel.com/software/ZShellScripts-0.1.tar.gz
What is The Grand Unification Theory ???
The Grand Unification Theory :
------------------------------
Why would Zope only support Python Scripts ?
Install ZShellScripts instead.
This will allow you to add your own languages interpreters,
and even define your own language syntax. Here's how :
1 - Create a Shell instance somewhere. Three types of Shell
instances are currently provided :
* Shell (Python) -- Can execute standard Zope Python Scripts.
Code was unashamedly borrowed from Zope 2.5.1,
then was re-ordered and factorized, so please report any
problem.
* Shell (Unix) -- Can execute Unix commands as the user Zope
is run as.
Variables like context, container, and so on are available
as standard environment variables, but will contain the URL
to the object instead of its value. This allows your shell
script to talk back to Zope using wget for example !
* Shell (Zope) -- Can (*will soon*) execute Zope ZShell commands.
This part is currently not working but be sure you'll get it
soon !!! Shell (Python) and Shell (Unix) work as expected,
as far as I have tested.
2 - Create a "Script (ZShell)" instance, and put the path
to your Shell instance on its first line in the usual
Unix shell scripts way :
#! /path/to/myshell
3 - Put content in your "Script (ZShell)" instance, for example
put Python code in it if the shell you use is an instance
of "Shell (Python)", or Unix shell commands if it is an
instance of "Shell (Unix)", and so on...
4 - Run your "Script (ZShell)" instance as usual, as if it was a
standard Zope Python Script for example.
Launching your instance, will in fact delegate the code
execution to the Shell instance which path you specified
on the first line of your "Script (ZShell)" instance.
5 - Enjoy !
6 - Profit ! (ok, this one comes directly from SlashDot)
7 - Use ShellUnix.py, ShellPython.py, and ShellZope.py as examples
to create your own Shell class. ZShellScripts don't need to
change.
Any comment, bug report or help is **very** welcome.
NB : It's only a 0.1 version.
Jerome Alet - alet@librelogiciel.com