Re: [Inkscape-devel] python extension scripts on win32?
Jasper van de Gronde wrote:
On win32 you can connect STDERR to a pipe if you're using CreateProcess (which at least the code in src/extension/implementation/script.cpp currently does). The relevant member of the STARTUPINFO struct is hStdError, as far as I know it can be set to the same handle as hStdOut (which has the disadvantage of possibly making it harder to separate error messages from normal output) as well as a different handle (which would make getting results from the program harder).
The second option (different handle) sounds to me like what should happen. Why do you say that makes it harder to get results from the program?
Aaron Spike
aaron@...749... wrote:
Jasper van de Gronde wrote:
On win32 you can connect STDERR to a pipe if you're using CreateProcess (which at least the code in src/extension/implementation/script.cpp currently does). The relevant member of the STARTUPINFO struct is hStdError, as far as I know it can be set to the same handle as hStdOut (which has the disadvantage of possibly making it harder to separate error messages from normal output) as well as a different handle (which would make getting results from the program harder).
The second option (different handle) sounds to me like what should happen. Why do you say that makes it harder to get results from the program?
As there would then be two streams that would need to be read (unless there is some simplifying circumstance).
Hi, all,
Just for testing and debugging this problem, has anyone tried running Inkscape from Cygwin's bash shell? It would probably be a lot more diagnostic than cmd.exe, and certainly better than command.com. Also, MS's new 'MSH' shell might be good for debugging.
Other shells might work, too, like running from ActivePerl's prompt.
Bob
Jasper van de Gronde wrote:
aaron@...749... wrote:
Jasper van de Gronde wrote:
On win32 you can connect STDERR to a pipe if you're using CreateProcess (which at least the code in src/extension/implementation/script.cpp currently does). The relevant member of the STARTUPINFO struct is hStdError, as far as I know it can be set to the same handle as hStdOut (which has the disadvantage of possibly making it harder to separate error messages from normal output) as well as a different handle (which would make getting results from the program harder).
The second option (different handle) sounds to me like what should happen. Why do you say that makes it harder to get results from the program?
As there would then be two streams that would need to be read (unless there is some simplifying circumstance).
Oh. Wait. You're -spawning- a shell. Never mind! ;)
Bob Jamison wrote:
Hi, all,
Just for testing and debugging this problem, has anyone tried running Inkscape from Cygwin's bash shell? It would probably be a lot more diagnostic than cmd.exe, and certainly better than command.com. Also, MS's new 'MSH' shell might be good for debugging.
Other shells might work, too, like running from ActivePerl's prompt.
Bob
Jasper van de Gronde wrote:
aaron@...749... wrote:
Jasper van de Gronde wrote:
On win32 you can connect STDERR to a pipe if you're using CreateProcess (which at least the code in src/extension/implementation/script.cpp currently does). The relevant member of the STARTUPINFO struct is hStdError, as far as I know it can be set to the same handle as hStdOut (which has the disadvantage of possibly making it harder to separate error messages from normal output) as well as a different handle (which would make getting results from the program harder).
The second option (different handle) sounds to me like what should happen. Why do you say that makes it harder to get results from the program?
As there would then be two streams that would need to be read (unless there is some simplifying circumstance).
aaron@...749... wrote:
Jasper van de Gronde wrote:
On win32 you can connect STDERR to a pipe if you're using CreateProcess (which at least the code in src/extension/implementation/script.cpp currently does). The relevant member of the STARTUPINFO struct is hStdError, as far as I know it can be set to the same handle as hStdOut (which has the disadvantage of possibly making it harder to separate error messages from normal output) as well as a different handle (which would make getting results from the program harder).
The second option (different handle) sounds to me like what should happen. Why do you say that makes it harder to get results from the program?
As there would then be two streams that would need to be read (unless there is some simplifying circumstance).
(If this is the second time this gets sent, sorry, my mail application was acting up.)
participants (3)
-
unknown@example.com
-
Bob Jamison
-
Jasper van de Gronde