command output from script-fu-server
This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
command output from script-fu-server | Ioan Calin Borcoman | 21 May 07:31 |
command output from script-fu-server | Niels Giesen | 24 May 20:41 |
command output from script-fu-server | Ioan Calin Borcoman | 25 May 09:15 |
command output from script-fu-server | Ioan Calin Borcoman | 25 May 10:02 |
command output from script-fu-server
Hi,
I have attached a small patch for script-fu-server that makes the server return to the clients the output of the commands executed, just like the script-fu-console does.
Is the patch ok? Any chance to apply it the mainline? Should I make a bug-report and attach the patch to it?
Thanx,
Ionutz
command output from script-fu-server
Hi,
I have attached a small patch for script-fu-server that makes the server return to the clients the output of the commands executed, just like the script-fu-console does.
Is the patch ok? Any chance to apply it the mainline? Should I make a bug-report and attach the patch to it?
Thanx,
Ionutz
This is great stuff. If we had had this a year ago, it would have
saved me a *lot* of ugly hacking about developing the client side
gimp-mode for Emacs. (If you wanna know, this was done by
wrapping the code to be sent
inside scheme code that wrote back to a file, with stuff such as
tracing and the various write and display functions not working).
The other implementation I did to interact with GIMP was with GIMP as
a subprocess as
a batch program; this is quite crude and does not work under that other OS
I have to use at work.
Attached is a small python program (my first) I wrote this morning that gives a simple REPL interface to the script-fu server based on your patch, you might want to use that for testing if your patch works. So far it is going strong.
I very much like to see this one implemented, and am working on
rewriting parts of gimp-mode for Emacs to use this facility. Even
though the script-fu server apparently was not intended for actual
use, its usefulness at least for developing script-fu inside an editor
of choice
is greatly enhanced with these additions.
It is looking promising.
Regards, Niels.
command output from script-fu-server
Let's hope it gets applied. I'll make a bug report and attach the patch to it.
My code uses something like this to send the data:
def send(self, msg):
l = len(msg)
raw = 'G' + struct.pack('H%ds' % l, socket.htons(l), msg)
self.socket.send(raw)
To receive the data, I use something like:
...
raw = self.socket.recv(4)
...
l = socket.ntohs(struct.unpack('H', raw[2:4])[0])
raw = self.socket.recv(int(l))
Worked ok until now. Very similar with your code :)
Cheers,
Ionutz
On Sun, May 24, 2009 at 9:41 PM, Niels Giesen wrote:
Hi,
I have attached a small patch for script-fu-server that makes the server return to the clients the output of the commands executed, just like the script-fu-console does.
Is the patch ok? Any chance to apply it the mainline? Should I make a bug-report and attach the patch to it?
Thanx,
Ionutz
This is great stuff. If we had had this a year ago, it would have saved me a *lot* of ugly hacking about developing the client side gimp-mode for Emacs. (If you wanna know, this was done by wrapping the code to be sent
inside scheme code that wrote back to a file, with stuff such as tracing and the various write and display functions not working). The other implementation I did to interact with GIMP was with GIMP as a subprocess as
a batch program; this is quite crude and does not work under that other OS I have to use at work.Attached is a small python program (my first) I wrote this morning that gives a simple REPL interface to the script-fu server based on your patch, you might want to use that for testing if your patch works. So far it is going strong.
I very much like to see this one implemented, and am working on rewriting parts of gimp-mode for Emacs to use this facility. Even though the script-fu server apparently was not intended for actual use, its usefulness at least for developing script-fu inside an editor of choice
is greatly enhanced with these additions.It is looking promising.
Regards, Niels.
command output from script-fu-server
I've filed the bug as 583778 (http://bugzilla.gnome.org/show_bug.cgi?id=583778).
Cheers.
Ionutz
On Mon, May 25, 2009 at 10:15 AM, Ioan Calin Borcoman wrote:
Let's hope it gets applied. I'll make a bug report and attach the patch to it.
My code uses something like this to send the data:
def send(self, msg): l = len(msg)
raw = 'G' + struct.pack('H%ds' % l, socket.htons(l), msg) self.socket.send(raw)To receive the data, I use something like: ...
raw = self.socket.recv(4)
...
l = socket.ntohs(struct.unpack('H', raw[2:4])[0]) raw = self.socket.recv(int(l))Worked ok until now. Very similar with your code :)
Cheers,
Ionutz
On Sun, May 24, 2009 at 9:41 PM, Niels Giesen wrote:
Hi,
I have attached a small patch for script-fu-server that makes the server return to the clients the output of the commands executed, just like the script-fu-console does.
Is the patch ok? Any chance to apply it the mainline? Should I make a bug-report and attach the patch to it?
Thanx,
Ionutz
This is great stuff. If we had had this a year ago, it would have saved me a *lot* of ugly hacking about developing the client side gimp-mode for Emacs. (If you wanna know, this was done by wrapping the code to be sent
inside scheme code that wrote back to a file, with stuff such as tracing and the various write and display functions not working). The other implementation I did to interact with GIMP was with GIMP as a subprocess as
a batch program; this is quite crude and does not work under that other OS I have to use at work.Attached is a small python program (my first) I wrote this morning that gives a simple REPL interface to the script-fu server based on your patch, you might want to use that for testing if your patch works. So far it is going strong.
I very much like to see this one implemented, and am working on rewriting parts of gimp-mode for Emacs to use this facility. Even though the script-fu server apparently was not intended for actual use, its usefulness at least for developing script-fu inside an editor of choice
is greatly enhanced with these additions.It is looking promising.
Regards, Niels.