[Zope] Running external applications
Pavlos Christoforou
pavlos@gaaros.msrc.sunysb.edu
Tue, 25 May 1999 11:59:49 -0400 (EDT)
On Tue, 25 May 1999, Howard Clinton Shaw III wrote:
> >
> On Tue, 25 May 1999, ì´ê´ì(LEE Kwan Soo) wrote:
> > On the ugliest side, there is system function from os moudle in Python, i.e.
> > import os
> > os.system("bla bla bla")
> > ..... ....
> >
> > You can run any application in this way. (in Wndows os.system("start this_program.exe") ).
>
> Ouch. Look at os.popen(). It opens a pipe to a given command, which acts just like a file. Read, write, and be happy.
>
In Zope 1.10.2, being single threaded, an external method has the
potential to block the whole Zope server. Make sure that the external
method returns its results fast enough.
For entertainment purposes try the following external method
def block():
while 1:
pass
Pavlos