[Zope] Running external applications
Howard Clinton Shaw III
shawh@sths.org
Tue, 25 May 1999 10:10:25 -0500
On Tue, 25 May 1999, ì´ê´ì(LEE Kwan Soo) wrote:
> Graham Chiu wrote:
>
>
> >I'm a newbie to Zope.
> Me, too. After 6monthes of Zoping. (which equals 6 week in ordinay time-space since I've been writing my dissertation.)
>
> >How does one run all ones legacy applications eg. windows executables,
> >perl scripts etc.
>
>
> Well, as far as I see, you can only run suitable imported "Python applications" as external methods.
>
> Yes, ONLY PYTHON APPLICATIONS.
>
> BUT ....
>
> PYTHON application CAN DO MANY THINGS.
>
> There is some ?COM support example went around a couple of weeks ago. So YOU CAN MANUPLATE any ?COM application which reside in the same machine with Zope. (I do not know about this esoteric art. maybe some guru and source can enlighten you).
>
> 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") ).
>
> The ugly face is that you do not have any direct way to force communication between the applicaion launched(forked?) in this way and the Zope par se.
>
> Once I was and am in this situation (with wget on my linux box) and did the ugliest thing to control the non-Python application. I forced the non-Python application write verbose log and let an Python external method read the log and do something. ...
>
> So if you are at least an awful newbie like me, welcome hell aboard. :-)
>
> Of course there are much elegant solutions which I can only guess from the source which the Zopian Gods bless us with, but I am too lazy or busy too practice the source.
>
Ouch. Look at os.popen(). It opens a pipe to a given command, which acts just like a file. Read, write, and be happy.
> May the Source be with you.
>
> LEE Kwan Soo.
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
--
Howard Clinton Shaw III - Grum
St. Thomas High School
#include "disclaimer.h"