I would like to write various output to a log file in the same manner as the print object. Does such an object exist?
I read:
I would like to write various output to a log file in the same manner as the print object. Does such an object exist?
[/tmp/log log this stuff ( | [shell]
cat /tmp/log
#!/bin/bash echo $@ >> /tmp/log.txt
?
HTH
x
On 1/30/06, CK chris@lo-res.org wrote:
I read:
I would like to write various output to a log file in the same manner as the print object. Does such an object exist?
[/tmp/log log this stuff ( | [shell]
cat /tmp/log
#!/bin/bash echo $@ >> /tmp/log.txt
Yeah, I already thought about that, but this will have to work under Windows as well. I don't have a working [shell] for Windows at the moment...
On Mon Jan 30, 2006 at 12:04:07PM -0600, chris clepper wrote:
On 1/30/06, CK chris@lo-res.org wrote:
I read:
I would like to write various output to a log file in the same manner as the print object. Does such an object exist?
[/tmp/log log this stuff ( | [shell]
cat /tmp/log
#!/bin/bash echo $@ >> /tmp/log.txt
Yeah, I already thought about that, but this will have to work under Windows as well. I don't have a working [shell] for Windows at the moment...
i must have deleted the beginning of this thread without reading it, but what about [msgfile] and [textfile] ?
on windows if you have mingw installed you can
[echo $1 >> c:/var/log.txt( | [popen]
or something...
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 1/30/06, cdr ix@replic.net wrote:
i must have deleted the beginning of this thread without reading it, but what about [msgfile] and [textfile] ?
I think the problem with [textfile] is that it builds a qlist in memory and then dumps that to disk overwriting the file each time. Having that run for many months would increase the memory size and time to write when each message is added. The [clear( message zaps everything.
On Jan 30, 2006, at 1:12 PM, cdr wrote:
On Mon Jan 30, 2006 at 12:04:07PM -0600, chris clepper wrote:
On 1/30/06, CK chris@lo-res.org wrote:
I read:
I would like to write various output to a log file in the same
manner as the print object. Does such an object exist?[/tmp/log log this stuff ( | [shell]
cat /tmp/log
#!/bin/bash echo $@ >> /tmp/log.txt
Yeah, I already thought about that, but this will have to work under Windows as well. I don't have a working [shell] for Windows at the moment...
i must have deleted the beginning of this thread without reading it,
but what about [msgfile] and [textfile] ?on windows if you have mingw installed you can
[echo $1 >> c:/var/log.txt( | [popen]
or something...
Wow, I didn't know about [popen]... how is it different from [shell]?
It seems like [shell], [system], and [popen] should all be merged into
one object, or maybe that's what [popen] already is.
Or does [popen] work something like UNIX/PHP's popen?
.hc
As we enjoy great advantages from inventions of others, we should be
glad of an opportunity to serve others by any invention of ours; and
this we should do freely and generously.
- Benjamin Franklin
Wow, I didn't know about [popen]... how is it different from [shell]?
[shell] needs sys-V style ipc and fork(), popen() exists on almost all platforms
popen() on windows spawns a cmd.exe /c so theres no way around mega-overhead if you are then using bash ontop of that. my [popen] patches easily sped up 3 or 4 times by switching to linux..
Maybe a more complex "print" object could be handy, as in one that can specify if the message goes to STDOUT, STDERR or the PD built-in console.
I still get console messages going to STDOUT on 0.38 on linux anyhow.. (SO I have both a terminal and the pd built-in console.
[print "name" stdout]
[print "name" stderr]
[print "name"] <- goes to built-in console.
On that note, I would really like a "clear console" to clear the damn console, a real pain with 1000 lines in it.
then we could just start PD with something like:
pd -open patch.pd -nogui 2>/tmp/log
How could this be done with the .app on OSX other than running from terminal the binary inside the .app...
.b.
Hans-Christoph Steiner wrote:
On Jan 30, 2006, at 1:12 PM, cdr wrote:
On Mon Jan 30, 2006 at 12:04:07PM -0600, chris clepper wrote:
On 1/30/06, CK chris@lo-res.org wrote:
I read:
I would like to write various output to a log file in the same manner as the print object. Does such an object exist?
[/tmp/log log this stuff ( | [shell]
cat /tmp/log
#!/bin/bash echo $@ >> /tmp/log.txt
Yeah, I already thought about that, but this will have to work under Windows as well. I don't have a working [shell] for Windows at the moment...
i must have deleted the beginning of this thread without reading it, but what about [msgfile] and [textfile] ?
on windows if you have mingw installed you can
[echo $1 >> c:/var/log.txt( | [popen]
or something...
Wow, I didn't know about [popen]... how is it different from [shell]?
It seems like [shell], [system], and [popen] should all be merged into one object, or maybe that's what [popen] already is.
Or does [popen] work something like UNIX/PHP's popen?
.hc
As we enjoy great advantages from inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously. - Benjamin Franklin
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo!
On that note, I would really like a "clear console" to clear the damn console, a real pain with 1000 lines in it.
then we could just start PD with something like:
pd -open patch.pd -nogui 2>/tmp/log
well, at least on linux you can do that with:
pd -stderr -open patch.pd -nogui 2>/tmp/log
LG Georg
On Jan 31, 2006, at 10:15 AM, B. Bogart wrote:
Maybe a more complex "print" object could be handy, as in one that can specify if the message goes to STDOUT, STDERR or the PD built-in
console.I still get console messages going to STDOUT on 0.38 on linux anyhow.. (SO I have both a terminal and the pd built-in console.
[print "name" stdout]
[print "name" stderr]
[print "name"] <- goes to built-in console.
Very handy, I like that idea.
On that note, I would really like a "clear console" to clear the damn console, a real pain with 1000 lines in it.
Clear would be useful, but also a preference to specify how many lines
of history the Pd window should keep.
then we could just start PD with something like:
pd -open patch.pd -nogui 2>/tmp/log
How could this be done with the .app on OSX other than running from terminal the binary inside the .app...
If you add "-stderr" to the preferences, then launch the Pd.app, then
everything will be logged to the console.log, which is viewable via
Console.app
.hc
.b.
Hans-Christoph Steiner wrote:
On Jan 30, 2006, at 1:12 PM, cdr wrote:
On Mon Jan 30, 2006 at 12:04:07PM -0600, chris clepper wrote:
On 1/30/06, CK chris@lo-res.org wrote:
I read:
I would like to write various output to a log file in the same
manner as the print object. Does such an object exist?[/tmp/log log this stuff ( | [shell]
cat /tmp/log
#!/bin/bash echo $@ >> /tmp/log.txt
Yeah, I already thought about that, but this will have to work under Windows as well. I don't have a working [shell] for Windows at the moment...
i must have deleted the beginning of this thread without reading it, but what about [msgfile] and [textfile] ?
on windows if you have mingw installed you can
[echo $1 >> c:/var/log.txt( | [popen]
or something...
Wow, I didn't know about [popen]... how is it different from [shell]?
It seems like [shell], [system], and [popen] should all be merged into one object, or maybe that's what [popen] already is.
Or does [popen] work something like UNIX/PHP's popen?
.hc
__ ____
As we enjoy great advantages from inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously. - Benjamin Franklin
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Using ReBirth is like trying to play an 808 with a long stick. -David Zicarelli
On Tue, 31 Jan 2006, B. Bogart wrote:
On that note, I would really like a "clear console" to clear the damn console, a real pain with 1000 lines in it.
Click whereever you want in the console, then press ctrl+shift+home and then delete. This will delete anything above where you first clicked.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
On 1/31/06, B. Bogart ben@ekran.org wrote:
Maybe a more complex "print" object could be handy, as in one that can specify if the message goes to STDOUT, STDERR or the PD built-in console.
I still get console messages going to STDOUT on 0.38 on linux anyhow.. (SO I have both a terminal and the pd built-in console.
[print "name" stdout]
[print "name" stderr]
[print "name"] <- goes to built-in console.
[print "name" /path/to/logfile]
Having that implemented across the three platforms would provide a good solution to my original question.
cgc
On Mon, 30 Jan 2006 12:04:07 -0600 chris clepper cgc@humboldtblvd.com wrote:
On 1/30/06, CK chris@lo-res.org wrote:
I read:
I would like to write various output to a log file in the same manner as the print object. Does such an object exist?
[/tmp/log log this stuff ( | [shell]
cat /tmp/log
#!/bin/bash echo $@ >> /tmp/log.txt
Yeah, I already thought about that, but this will have to work under Windows as well. I don't have a working [shell] for Windows at the moment...
of course you can also write log files with py/pyext ...
t
Hallo, chris clepper hat gesagt: // chris clepper wrote:
I would like to write various output to a log file in the same manner as the print object. Does such an object exist?
You could use [netsend] connected to "pdreceive PORT >> logfile" on Linux/OS-X. Probably on Windows pdreceive can do something similar, I just don't know the syntax.
Frank Barknecht _ ______footils.org_ __goto10.org__
On 1/30/06, Frank Barknecht fbar@footils.org wrote:
You could use [netsend] connected to "pdreceive PORT >> logfile" on Linux/OS-X. Probably on Windows pdreceive can do something similar, I just don't know the syntax.
Thanks Frank/ This works on OSX, but it requires another process to work. I suppose it just means having a script to fire the pdreceive process on boot/login though. Worth a test at least.
cgc