[PD] communicating with the shell

Chris McCormick chris at mccormick.cx
Thu Feb 5 12:04:59 CET 2009


On Wed, Jan 28, 2009 at 02:26:13PM +0000, Rob Canning wrote:
> (it would be really nice to have an object for communicating with the 
> shell that is not buggy.)

[snip]

> also this method is fine for sending stuff to the shell but what about 
> getting results back from the shell? like a bang when the process is 
> finsihed or the result of a pwd command?
> i thought about pipeing | the output of the shell into a pdsend on 
> another port but that seems messy?
> 
> anyone got solutions to these issues? or anyone with the skills agree 
> that [shell] should be fixed or rewritten and included in another lib?

As a fan of vanilla Pd, I was delighted when Claude posted this:

<http://lists.puredata.info/pipermail/pd-list/2008-03/060702.html>

Attached is a concrete example of this for your specific use case. It
allows you to run arbitrary commands on your shell and get the results
back into Pd. I know you said that this seems messy to you, but I feel
that Claude's way is actually quite elegant.

Untar the attached, and then do:

pd -open runme.pd &; sleep 5; ./listener

Have fun!

Best,

Chris.

-------------------
http://mccormick.cx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: puredata-bash-communicator.tgz
Type: application/x-gtar
Size: 641 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20090205/7943bf49/attachment.tgz>


More information about the Pd-list mailing list