It seems usefull....thanks for share!
husk
Hi,
>From the RjDj labs:
PdParser can be used to parse Pd files in Python (for stuff like documentation
for example).
Browse here for the download:
<http://mccormick.cx/dev/PdParser/>
Or check it out with bzr:
bzr co http://mccormick.cx/dev/PdParser/
Example:
(Find all objects which are comment boxes in the subpatch 'REFERENCE', and all
messages boxes in the subpatch 'hello')
>>> p = PdParser("my-patch.pd")
>>>
>>> def found(canvasStack, type, action, bits):
... print "canvasStack:", canvasStack, "type:", type, "action:", action, "arguments:", bits
...
>>> p.add_filter_method(found, canvas="REFERENCE", type="#X", action="text")
>>> p.add_filter_method(found, canvas="hello", type="#X", action="msg")
>>> print p.parse(), "elements found"
Best,
Chris.
-------------------
http://mccormick.cx
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list