Re: [PD] capture cosole output
You could probably hack some tcl code and send it to [sys_gui] and have that send the .printout text to a [receive]. It would be a good project for getting to know the internals of Pd's GUI. .printout is the console part of the Pd window. .printout.text is the text widget that displays the text. Here's the Tcl/Tk docs on the text widget: http://tcl.tk/man/tcl8.4/TkCmd/text.htm pdtk_post is the procedure that actually posts text to the .printout.text. You could probably redefine pdtk_post to instead send the data to a receive, something like this: pdtk_post {stuff} { } Hmm, I guess you can't send that to [sys_gui] since Pd can't do { and }. Another way would be to add "pd [concat pd error $stuff]" to pdtk_post and then add a little bit of C code to get the data from messages send to: [route pd] | [route error] .hc On May 20, 2008, at 3:28 PM, marius schebella wrote: > would it be possible with the current pd version to write an > additional > object like the max [error] that outputs all error messages on an > outlet > when turned on (message 1)? > or does this also need the hook you were talking about. > marius. > > IOhannes m zmoelnig wrote: >> João Pais wrote: >>> Hi. >> >>> Does this interest anyone? Does anyone want to have a go at it? >>> Afaik >>> there's no object that can do this. >> >> there have been numerous attempts and solutions to this problem. >> including using netsend to pipe the stderr back into Pd, adding >> hooks to >> register new post()-backends (which could be the message-output of an >> object),... >> the latter requires a patched Pd-version (the patch exists in the >> patchtracker, afaik) but miller never fully accepted it into the main >> source-tree (though part of it: the embedded pd-console is part of >> it; >> and the ability to choose between stderr and pd-console) >> the former does not require such, but is less efficient (but then: it >> also grabs errors that are not "post"ed but thrown e.g. by ioctl's) >> >> >> just search the list archives for "capture console output" :-) >> >> >> mfgasdr >> IOhannes >> >> ___ >> PD-list@iem.at mailing list >> UNSUBSCRIBE and account-management -> http://lists.puredata.info/ >> listinfo/pd-list >> > > > ___ > PD-list@iem.at mailing list > UNSUBSCRIBE and account-management -> http://lists.puredata.info/ > listinfo/pd-list I spent 33 years and four months in active military service and during that period I spent most of my time as a high class muscle man for Big Business, for Wall Street and the bankers. - General Smedley Butler ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] capture cosole output
would it be possible with the current pd version to write an additional object like the max [error] that outputs all error messages on an outlet when turned on (message 1)? or does this also need the hook you were talking about. marius. IOhannes m zmoelnig wrote: > João Pais wrote: >> Hi. > >> Does this interest anyone? Does anyone want to have a go at it? Afaik >> there's no object that can do this. > > there have been numerous attempts and solutions to this problem. > including using netsend to pipe the stderr back into Pd, adding hooks to > register new post()-backends (which could be the message-output of an > object),... > the latter requires a patched Pd-version (the patch exists in the > patchtracker, afaik) but miller never fully accepted it into the main > source-tree (though part of it: the embedded pd-console is part of it; > and the ability to choose between stderr and pd-console) > the former does not require such, but is less efficient (but then: it > also grabs errors that are not "post"ed but thrown e.g. by ioctl's) > > > just search the list archives for "capture console output" :-) > > > mfgasdr > IOhannes > > ___ > PD-list@iem.at mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list > ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] capture cosole output
João Pais wrote: > Hi. > Does this interest anyone? Does anyone want to have a go at it? Afaik > there's no object that can do this. there have been numerous attempts and solutions to this problem. including using netsend to pipe the stderr back into Pd, adding hooks to register new post()-backends (which could be the message-output of an object),... the latter requires a patched Pd-version (the patch exists in the patchtracker, afaik) but miller never fully accepted it into the main source-tree (though part of it: the embedded pd-console is part of it; and the ability to choose between stderr and pd-console) the former does not require such, but is less efficient (but then: it also grabs errors that are not "post"ed but thrown e.g. by ioctl's) just search the list archives for "capture console output" :-) mfgasdr IOhannes ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
[PD] capture cosole output
Hi. I am working on a patch that should develop into a tool that will be used by (hopefully many) instrumentalists/conductors, specially non-pd users. While working on it, I thought that if a non-technical user runs into an error, then he has always to look at the console, which is, for some kind of people, kind of asking too much. (it might already be complicated for some not to present a single-file standalone to work with) Which reminded me: wouldn't it be useful to have an object that could capture the console contents? The main purpose could be to get the error messages (that only display in the console, I think no object sends a bang or something on error). Then this information could be treated in a way to make the patch more user-friendly (f.e. display a designed error message, and consequently how to correct it). Does this interest anyone? Does anyone want to have a go at it? Afaik there's no object that can do this. João Pais -- Friedenstr. 58 10249 Berlin Deutschland Tel +49 30 42020091 Mob +49 162 6843570 [EMAIL PROTECTED] skype: jmmmpjmmmp http://www.puredata.org/Members/jmmmp IBM Thinkpad R51, XP, Ubuntu GG Pd-Ext-0.39-2-t5, Pd Van 0.40-t2 ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list