You are not logged in Log in Join
You are here: Home » Members » jerome_alet » ZShellScripts » dc_view

Log in
Name

Password

 
 


Dublin Core Elements

The Dublin Core metadata element set is a standard for cross-domain information resource description.
Element Description Value
Identifier resource ID http://old.zope.org/Members/jerome_alet/ZShellScripts
Title resource name ZShellScripts
Description resource summary ZShellScripts _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. Several types of Shell instances are currently provided : * Shell (Python) -- Can execute standard Zope Python Scripts. Code was shamelessly borrowed from Zope 2.5.1 * Shell (Unix) -- Can execute real Unix commands as the user Zope is run as. The commands are executed at the underlying OS level. * Shell (Lisp) -- Can execute Lisp scripts in the "PyLisp":http://www.biostat.wisc.edu/~annis/creations/PyLisp/pylisp.html dialect. * Shell (Perl) -- Can execute Perl scripts as the user Zope is run as. * Shell (PHP) -- Can execute PHP scripts as the user Zope is run as. * Shell (Zope) -- Can (*will soon*) execute Zope ZShell commands. This part is currently not working but be sure you'll get it soon !!! 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** *(this path represents a path inside the ZODB)* 3 - Put content in your ZShellScript 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)" 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. The REQUEST's contents, as well as the variables usually available in native Python Scripts object, are also available transparently in your language of choice, for example, in Perl ZShellScripts you can write : print $context->title_or_id; and so on... Use your language facilities to learn what variables are directly accessible and their values (e.g. printenv in Unix scripts) 5 - ??? 6 - Profit ! (ok, this one comes directly from "SlashDot":http://www.slashdot.org) 7 - Use *ShellUnix.py*, *ShellPython.py*, *ShellLisp.py* or *ShellZope.py* as examples to create your own Shell class. *ZShellScripts.py* doesn't need to change. **NB : YOU DON'T NEED ZShell TO USE ZShellScripts** Enjoy ! Comments are **VERY** welcome.
Creator resource creator ZopeOrgSite
Date default date 2003-06-26 12:58:32
Format resource format text/html
Type resource type Software Package
Subject resource keywords Content Object, Developer, Helpers
Contributors resource collaborators
Language resource language
Publisher resource publisher No publisher
Rights resource copyright


Additional Zope Elements

Element Description Value
CreationDate date resource created 2003-06-26 12:58:32
ModificationDate date resource last modified 2003-06-26 12:58:32
EffectiveDate date resource becomes effective None
ExpirationDate date resource expires None

Backlinks: via Google / Technorati