Re: [Zope] Executing an external program

2000-05-22 Thread Jonothan Farr
> Note that it works from the Python command line, but not from a Zope > external method. I'm still trying to figure out why it is failing from > within Zope (anybody have an idea?). How does it 'not work' from an external method? --jfarr "Perl is worse than Python because people wanted it w

RE: [Zope] Executing an external program

2000-05-22 Thread Eric L. Walstad
Hi Brad, I'm working on this now, too. Here's what I've got so far: --Start Python Module-- import sys, os, string def rn(): """ docstring """ f = os.popen("/usr/local/Zope/Extensions/a.out") lines = f.readlines() status = f.close() if status: "There was an

Re: [Zope] Executing an external program

2000-05-22 Thread Chris McDonough
Brad, look into external methods. There is a howto on the zope.org website at http://www.zope.org/Documentation/How-To/ExternalMethods You'll need to know some Python, probably most importantly read about the os module's "popen" method at http://www.python.org/doc/current/lib/os-newstreams.html