It seems usefull....thanks for share!<br>husk<br><br><div class="gmail_quote">On Wed, Dec 2, 2009 at 12:21 PM, Chris McCormick <span dir="ltr"><<a href="mailto:chris@mccormick.cx">chris@mccormick.cx</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
>From the RjDj labs:<br>
<br>
PdParser can be used to parse Pd files in Python (for stuff like documentation<br>
for example).<br>
<br>
Browse here for the download:<br>
<<a href="http://mccormick.cx/dev/PdParser/" target="_blank">http://mccormick.cx/dev/PdParser/</a>><br>
<br>
Or check it out with bzr:<br>
bzr co <a href="http://mccormick.cx/dev/PdParser/" target="_blank">http://mccormick.cx/dev/PdParser/</a><br>
<br>
Example:<br>
<br>
(Find all objects which are comment boxes in the subpatch 'REFERENCE', and all<br>
messages boxes in the subpatch 'hello')<br>
<br>
>>> p = PdParser("my-patch.pd")<br>
>>><br>
>>> def found(canvasStack, type, action, bits):<br>
... print "canvasStack:", canvasStack, "type:", type, "action:", action, "arguments:", bits<br>
...<br>
>>> p.add_filter_method(found, canvas="REFERENCE", type="#X", action="text")<br>
>>> p.add_filter_method(found, canvas="hello", type="#X", action="msg")<br>
>>> print p.parse(), "elements found"<br>
<br>
Best,<br>
<br>
Chris.<br>
<br>
-------------------<br>
<a href="http://mccormick.cx" target="_blank">http://mccormick.cx</a><br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>If identity in the Post-modernism is nothing you can call me a RadikalTeknoFreak Hartivist<br><a href="http://www.estereotips.net">www.estereotips.net</a><br><a href="http://qeve.estereotips.net">qeve.estereotips.net</a><br>