[PD-dev] read a *.plist array in tcl

Hans-Christoph Steiner hans at at.or.at
Fri Mar 25 17:35:06 CET 2011


On Thu, 2011-03-24 at 19:43 +0100, yvan volochine wrote:
> hi
> when reading from a *.plist file in tcl, if the value asked is an array, 
> I get a string:
> 
> if {![catch {exec defaults read org.puredata $akey} arr]} {
>      puts $arr
> }
> 
> // this string is printed
> (
> "foo",
> "bar"
> )
> 
> is there any elegant way to get this array as a tcl list directly ?

Some Tcl regsub tricks seem to work pretty well, see attachment.

.hc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: parse-defaults.tcl
Type: text/x-tcl
Size: 651 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20110325/4900f681/attachment.tcl>


More information about the Pd-dev mailing list