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">&lt;<a href="mailto:chris@mccormick.cx">chris@mccormick.cx</a>&gt;</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>
&lt;<a href="http://mccormick.cx/dev/PdParser/" target="_blank">http://mccormick.cx/dev/PdParser/</a>&gt;<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 &#39;REFERENCE&#39;, and all<br>
messages boxes in the subpatch &#39;hello&#39;)<br>
<br>
&gt;&gt;&gt; p = PdParser(&quot;my-patch.pd&quot;)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; def found(canvasStack, type, action, bits):<br>
...   print &quot;canvasStack:&quot;, canvasStack, &quot;type:&quot;, type, &quot;action:&quot;, action, &quot;arguments:&quot;, bits<br>
...<br>
&gt;&gt;&gt; p.add_filter_method(found, canvas=&quot;REFERENCE&quot;, type=&quot;#X&quot;, action=&quot;text&quot;)<br>
&gt;&gt;&gt; p.add_filter_method(found, canvas=&quot;hello&quot;, type=&quot;#X&quot;, action=&quot;msg&quot;)<br>
&gt;&gt;&gt; print p.parse(), &quot;elements found&quot;<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 -&gt; <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>