[Zope-dev] [Zope-dev]: zshell

Jason Cunliffe jasonic@nomadicsltd.com
Tue, 15 May 2001 12:25:50 -0400


> Does any one has an example how to use the zshell ?
> I would like to use it. But, I cannot find many documentation on it.

Hi

The short answer is inside zshell run 'man' adn you will have all the
documentation you need to 'use' it. But I suspect yuo have not yet installed
zshell succesfully...

Jerome Alet's documentation is very clear so be sure to print out and
readhis README and NEWS files. These are simple ascii text files you can
open anywhere.

If you are on Windows, and can't see any documentation, it might be
expecting a 3-letter suffix such as .txt and so be hidinng the files from
you. open [file] Explorer and change your settings:
View Menu | Folder Options | View [tab] | Files and Folders | Hidden Files
then select 'show all files' & OK


Here's my ad-hoc zshell instllation how-to:

To use zshell you must first install 2 small Python modules

1. jaxml
2. zshell-<latestversionnumber>.py

===========================================
installing jaxml
===========================================
'jaxml' is separate module by Jerome Alet for constructing XML using
familiar and much simpler python object syntax.

Download jaxml from
http://cortex.unice.fr/~jerome/jaxml/
The current version of jaxml to get is
jaxml-2.22.tar.gz       24-Apr-2001 09:57    23k  GZIP compressed docume>
The README for latest version is always presented at the bottom of that
page.
The same README included in the download file archive.

Follow the installation instructions in the README.
Whatever Python you are using to run Zope must be able to 'import jaxml'
successfully.
After installing jaxml you can quickly test manually at the python CLI. For
example:

[jasonic@colocate05 jasonic]$ python

Python 1.5.2 (#1, Feb  1 2000, 16:32:16)  [GCC egcs-2.91.66 19990314/Linux
(egcs- on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import jaxml
>>> print jaxml.__version__
2.22

or in a small Zope External Method script:

# test_jaxml.py
import jaxml
return jaxml.__version__

===========================================================
installing zshell
===========================================================
Download latest version of zshell from:
http://cortex.unice.fr/~jerome/zshell/

The current version README is always presented on this page. ZShell grows
very fast!
Current is
zshell-0.8.tar.gz       14-May-2001 00:51    28k  GZIP compressed docume>

This archive contains 4 files: README, COPY, NEWS and zshell.py

copy sure zshell.py to the 'Extensions' folder of your Zoper isntallation
Then from the Zope Management Interface add an External Method in your Zope
top level root '/' folder:

Id            zshell
Title         <optional = whatever you want here>
Module Name   zshell
Function Name zshell

Click [SAVE CHANGES] button

You have now added an intance of 'zshell' at the top level reachable from
anywhere via zope acquisition by appending /zshell to your zope object path.
Thus you only need one zshell.


============================================================
USING ZSHELL
============================================================

just click on 'zshell' and then view or directly from the browser or via a
link:

http://www.yourzopesite.com/zshell

Once in zshell enter commands manually, or using the handy shortcut syntax
links.
To run them hit the 'RUN' button!

First off run 'man' or 'help' and print out the reuslts page so you have
reference documetation.

You can enter multiple commands on separate lines.

.zsh load and save scripts hopefully coming soon.

===========================================================
UPDATING ZSHELL
===========================================================
It is easy to upgrade to a newer version of zshell:

a. Copy the latest zshell.py into 'Extensions' replacnig the old fiel of the
same name
b. Enter the Zope management interface and click on your instance of zshell
c. Click [SAVE CHANGES] button again. That's all - no need to restart zope.


hth
./Jason
___________________________________________________________
Jason CUNLIFFE = NOMADICS['Interactive Art and Technology']