Re: [Gimp-developer] stdout from lisp

2006-04-10 Thread Kevin Cozens

[EMAIL PROTECTED] wrote:

Output from Script-fu can be sent to "stdout" by first performing a:

  (gimp-message-set-handler 1)


The Procedure Browser shows that the arguments '1' has an equivalent (C style) 
name of GIMP_CONSOLE. In Script-Fu you remove the leading GIMP_ from named 
constants shown in the Procedure Browser and change any remaining _ to -. That 
would mean you could use


(gimp-message-set-handler CONSOLE)

which has the extra benefit of being more readable. You don't have to go back 
to the procedure browser to find out what the 1 means.


Just a suggestion to use the named constants where available to make the 
scripts a little more readable, save some trips back to the procedure browser 
which should make any needed debugging a little less tedious.


--
Cheers!

Kevin.

http://www.interlog.com/~kcozens/ |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172|"Same thing we always do, Pinkutus:
  |  Try to assimilate the world!"
#include|  -Pinkutus & the Borg
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] stdout from lisp

2006-04-10 Thread Kovacs Baldvin
On Sun, Apr 09, 2006 at 09:34 -0700, [EMAIL PROTECTED] wrote:
> Kovacs,
> 
> Output from Script-fu can be sent to "stdout" by first performing a:
> 
>   (gimp-message-set-handler 1)
> 
> and then sending your strings using something like
> 
>   (gimp-message "foobar")
> 
> where "foobar" is the string to printed on "stdout".
> 
> Perhaps this will be sufficient for your needs?

Yes, definitely! Thank you very much!

(P.s.: as a "keep it stupid and simple" fan I'd probably arrange things
in a way that the default print methods of siod do print to stdout. But
anyways, what I really needed is just any method to print, so I'll do
with what you showed.).

Thanks,
Baldvin
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] stdout from lisp

2006-04-09 Thread saulgoode
Kovacs,

Output from Script-fu can be sent to "stdout" by first performing a:

  (gimp-message-set-handler 1)

and then sending your strings using something like

  (gimp-message "foobar")

where "foobar" is the string to printed on "stdout".

Perhaps this will be sufficient for your needs?

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] stdout from lisp

2006-04-08 Thread Kovacs Baldvin
Before I post my question to the list, I looked up the archives.
Good for me, because I have found the exact same question in a 2 year
old mail, unfortunately no answers.

So may I ask the same question? If anybody has information about it,
please share it. I'd like to develop scripts using gimp, and it would
be so nice to be able to debug with printing to the standard output...

Here is the question, originally from Markus Triska:

> The thing is: The "print" command ("(print "test")" ) is not working for
> me in batch-mode (Gimp 2.0.2). It does what it should on the Script-FU
> console, but shows no output when used like
> 
> gimp -c -i -d -b '(filter-previews)' '(gimp-quit 0)'
> 
> A more simple case: When I create this file ("testprint.scm") in 
> ~/gimp-2.0/script/:
> 
> (define (testprint)
>   (print "this is a test"))
> 
> and invoke
> 
> gimp -c -i -d -b '(testprint)' '(gimp-quit 0)'
> 
> I get:
> 
> batch command: executed successfully.
> 
> (and nothing else)
> 
> Is this a bug?

And if it is: how does one work it around, so how to print to stdout?

Best regards,
Baldvin Kovacs
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer