[PD] writing to log files

Hans-Christoph Steiner hans at eds.org
Tue Jan 31 19:18:03 CET 2006


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 at 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 at 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





More information about the Pd-list mailing list