[Zope] Server Side Questions

mixo mixo@beth.uniforum.org.za
Tue, 14 Aug 2001 17:06:36 +0200


Tino Wildenhain wrote:

> Hi mixo,
> ...snip...
> >
> > I already have cgi scripts (shell scripts) that perform certain functions
> > which are sitting on some remote machine (which is not running Zope). I
> > want to be able to use them, and avoid rewriting them in Python (at least
> > for now). What I am looking for is something  like
> >           <!--#exec cgi="somescript-->
> > which executes a cgi script.
>
> <dtml-call somescriptmethod>
>
> In Extensions folder make python program like this:
>
> import os
> def somescriptmethod:
>     return os.system('path/to/your/script')
>
> Include this as external Method from management interface.
>
> Note: it is absolutely no good Idea (especially If you are new
> to python) to make the program name a parameter.
>
> HTH
> Tino Wildenhain

Actually, since the scripts I want to run are running on a remote machine
and, they are accessible through the web, I just added the following lines
to  python script :

   import urllib
   stuff=urllib.urlopen("http://remotehost/cgi-bin/somecgiscript")
   print stuff.read()

And I get the results from the script being executed.

Mixo
P.S. I have tried this through Zope yet.