[PD] communicating with the shell
padawan12 at obiwannabe.co.uk
Thu Jan 29 00:49:01 CET 2009
Yep, actually that was a prescriptive and arrogant thing
of me to suggest dropping it. I have lots of patches that use
So, poor [shell], very useful, but quite broken (if you use
it in any serious way). How can it be fixed?
On Thu, 29 Jan 2009 00:12:14 +0100
Jack <jack at rybn.org> wrote:
> I just want to say that i am very happy tu use [shell] in my patch.
> It is very useful to execute a PHP script for exemple.
> Le 28 janv. 09 à 21:49, Andy Farnell a écrit :
> > Both Lua and Python are great suggestions. But avoid the issue
> > of fixing [shell]. It has been problematic for a long time and
> > this is another opportunity to discover how to fix it, or
> > deprecate/remove it altogether.
> > I think there's something to be said for all Pd distros _not_
> > including [shell] for obvious reasons. If users want to open
> > that door it should be an informed decision. That would happen
> > if they could only use PyExt and PdLua. [shell] is very buggy,
> > has it's day finally come to be fixed or dropped?
> > On Wed, 28 Jan 2009 14:50:32 -0500
> > patrick <puredata at 11h11.com> wrote:
> >> another solution is with pyext.
> >> in pdmtl abstractions it's under linux.process.pd (but i think it
> >> should
> >> work on windows and mac (not tested)).
> >> import sys, os, time, signal, subprocess
> >> try:
> >> import pyext
> >> except:
> >> print "ERROR: This script must be loaded by the PD pyext
> >> external"
> >> sys.exit()
> >> class sub(pyext._class):
> >> """A simple script to start and stop process"""
> >> # number of inlets and outlets
> >> _inlets=1
> >> _outlets=1
> >> def __init__(self,*args):
> >> pass
> >> def start_1(self,a):
> >> global process
> >> process = subprocess.Popen(str(a))
> >> self._outlet(1, 'opening '+str(a))
> >> def stop_1(self,*a):
> >> os.kill(process.pid, signal.SIGTERM)
> >> self._outlet(1, 'stopping process '+str(process.pid))
> >> _______________________________________________
> >> Pd-list at iem.at mailing list
> >> UNSUBSCRIBE and account-management -> http://lists.puredata.info/
> >> listinfo/pd-list
> > --
> > Use the source
> > _______________________________________________
> > Pd-list at iem.at mailing list
> > UNSUBSCRIBE and account-management -> http://lists.puredata.info/
> > listinfo/pd-list
Use the source
More information about the Pd-list