[PD-dev] pyx shell replacement

B. Bogart ben at ekran.org
Tue Jan 29 01:14:41 CET 2008


Hey Thomas ++

Is there any flext/pyx magic for converting from python types to PD types?

The way I'm using shell has two cases:

1. it only returns a single number (cpu or memory usage)

2. it executes an xset command, and does not care about output.

So for now I'm assuming these cases.

Ideally it would be nice if a command output this: "0 10 0.3" then
outlet would send a list of three floats. "0 dog" as a message of a
float and a symbol etc..

looping through all the types and testing is the string could be coerced
seems less fun.

Thanks,
.b.

Thomas Grill wrote:
> 
> Am 29.01.2008 um 00:20 schrieb Thomas Grill:
> 
>>>
>>
>> Hi,
>>
>>> I figured something that runs os.system() on an arbitrary string would
>>> be a good enough start, though coercing the _anything_ *args into a
>>> string seems to be challenging me.
>>
>> do you mean "".join(map(str,*args))  ?
> 
> no sorry, if args is a sequence i think you rather mean
> 
> os.system(" ".join(map(str,args)))
> 
> In this case the arguments are separated by spaces.
> 
> gr~~~
> 
> -- 
> Thomas Grill
> http://grrrr.org
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev





More information about the Pd-dev mailing list