[Zope] Running external applications

이관수(LEE Kwan Soo) kslee@plaza1.snu.ac.kr
Tue, 25 May 1999 22:33:44 +0900


 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.

May the Source be with you.

LEE Kwan Soo.