RE: [Zope] Couple of 2.0b1 observations on win98
I assume there is no earthly way to get zope to run external cgi-scripts or executables (with Zserver that is; for the moment I am using zserver) unless the script is in python.
Depends what the meaning of the words "in Python" is... :^) You could write an External Method in Python: import os some_script_output = os.popen("some_script.pl",'r').readlines() some_script_output is then a list of lines of output. In this example some_script.pl is in perl. If you weren't interested in the output (i.e., you just wanted to run something), you could (I think) use: import os os.system("some_script.pl") --Rob
On Sun, 1 Aug 1999, Rob Page wrote:
Depends what the meaning of the words "in Python" is... :^)
You could write an External Method in Python:
import os some_script_output = os.popen("some_script.pl",'r').readlines()
some_script_output is then a list of lines of output. In this example some_script.pl is in perl.
If you weren't interested in the output (i.e., you just wanted to run something), you could (I think) use:
import os os.system("some_script.pl") Well, that's dangerous. I'd much more prefer: os.system("some_script.pl >/dev/null 2>/dev/null")
At least in the Bobo version, pcgi was VERY sensitive about things getting written to stdout/stderr. Andreas -- Andreas Kostyrka | andreas@mtg.co.at phone: +43/1/7070750 | phone: +43/676/4091256 MTG Handelsges.m.b.H. | fax: +43/1/7065299 Raiffeisenstr. 16/9 | 2320 Zwoelfaxing AUSTRIA
On Sun, 1 Aug 1999, Rob Page wrote:
I assume there is no earthly way to get zope to run external cgi-scripts or executables (with Zserver that is; for the moment I am using zserver) unless the script is in python.
import os os.system("some_script.pl")
Or, under Windows, os.spawnve is a good way to do this as you can automagically set the environment from within python. Remember to add a 'dummy' first arg to the arg list to keep Billy happy. Cheers, Anthony Pfrunder
participants (3)
-
Andreas Kostyrka -
Anthony Pfrunder -
Rob Page