It seems usefull....thanks for share! husk
On Wed, Dec 2, 2009 at 12:21 PM, Chris McCormick chris@mccormick.cx wrote:
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.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list