python extension scripts on win32?
Can anyone confirm if these work, or at least, are expected to work? I have created a path, and selected some of these effects, but I see no result. Is there a way to get some feedback? (like --verbose from the command line?)
BTW, I'm trying out Inkscape-0.41+0.42pre1-1.win32.exe on WinXP-SP1
-- lode
lode leroy wrote:
Can anyone confirm if these work, or at least, are expected to work? I have created a path, and selected some of these effects, but I see no result. Is there a way to get some feedback? (like --verbose from the command line?)
BTW, I'm trying out Inkscape-0.41+0.42pre1-1.win32.exe on WinXP-SP1
I can confirm that they used to work. But the build I made from CVS last night didn't. I will try the latest snapshot when I get to work this morning. We should probably get Bob to try it once. And then if it doesn't work ask Ted to look at the code he wrote to capture STDERR from scripts. (This was added so that users could get feedback from scripts.) Ted doesn't work with Win32 so he will probably need help debugging it.
Ted, what can we do to help?
Aaron Spike
aaron@...749... wrote:
lode leroy wrote:
Can anyone confirm if these work, or at least, are expected to work? I have created a path, and selected some of these effects, but I see no result. Is there a way to get some feedback? (like --verbose from the command line?)
BTW, I'm trying out Inkscape-0.41+0.42pre1-1.win32.exe on WinXP-SP1
I can confirm that they used to work. But the build I made from CVS last night didn't. I will try the latest snapshot when I get to work this morning. We should probably get Bob to try it once. And then if it doesn't work ask Ted to look at the code he wrote to capture STDERR from scripts. (This was added so that users could get feedback from scripts.) Ted doesn't work with Win32 so he will probably need help debugging it.
Ted, what can we do to help?
Python and Perl Effects are broken on Bob's latest windows build too. Shall I file a bug?
Aaron Spike
aaron@...749... wrote:
aaron@...749... wrote:
Ted, what can we do to help?
Python and Perl Effects are broken on Bob's latest windows build too. Shall I file a bug?
Yeah, you should probably file a bug :(
Can you comment out the 'if' statement in the 'execute' function in script.cpp that contains the line:
g_strdup_printf("%s 2> %s"...
And see if that makes things work again? That would be an important data point.
Thanks, Ted
Ted Gould wrote:
aaron@...749... wrote:
aaron@...749... wrote:
Ted, what can we do to help?
Python and Perl Effects are broken on Bob's latest windows build too. Shall I file a bug?
Yeah, you should probably file a bug :(
will do.
Can you comment out the 'if' statement in the 'execute' function in script.cpp that contains the line:
g_strdup_printf("%s 2> %s"...
Do you me that you want the inner block to execute unconditionally? If so, when I remove the "if" it still doesn't work. I wish I knew enough C++ to know, but are the next two lines in the appropriate order?
g_free(command); command = temp;
Aaron Spike
On Thu, 2005-07-07 at 21:24 -0500, aaron@...749... wrote:
Do you me that you want the inner block to execute unconditionally? If so, when I remove the "if" it still doesn't work. I wish I knew enough C++ to know, but are the next two lines in the appropriate order?
g_free(command); command = temp;
Sorry, I was unclear. No, just remove all the code in that if. Probably and easy way to do that is change it to "if (false &&" which will make it always fail, but not require many changes.
Those are the in right order because the code is doing a swap. I think this example might help:
command -> "bob is here" temp -> NULL
g_strdup_printf
command -> "bob is here" temp -> "bob is here now"
g_free
command -> NULL temp -> "bob is here now"
assignment
command -> temp -> "bob is here now"
So, at the end of the if, command points to a string with " now" added at the end of it, and the memory that was previously used by command, has been returned on the stack.
Thanks for looking into this.
--Ted
Ted Gould wrote:
Sorry, I was unclear. No, just remove all the code in that if. Probably and easy way to do that is change it to "if (false &&" which will make it always fail, but not require many changes.
Ah, that makes much more sense. Removing the code makes it work. I sat down and tried STDERR redirection with "2>" in cmd.exe and found that it works fine. I wouldn't be surprised, however, if it was not available in earlier versions of windows. So what could the problem be? Perhaps the "awesome power" of the dos shell is not available to Inkscape. Is it possible for Inkscape to hook into both STDERR and STDOUT with out using a temporary file?
Aaron Spike
aaron@...749... wrote:
Ted Gould wrote:
Sorry, I was unclear. No, just remove all the code in that if. Probably and easy way to do that is change it to "if (false &&" which will make it always fail, but not require many changes.
Ah, that makes much more sense. Removing the code makes it work. I sat down and tried STDERR redirection with "2>" in cmd.exe and found that it works fine. I wouldn't be surprised, however, if it was not available in earlier versions of windows. So what could the problem be? Perhaps the "awesome power" of the dos shell is not available to Inkscape. Is it possible for Inkscape to hook into both STDERR and STDOUT with out using a temporary file?
I assume you're talking about getting data from STDERR/STDOUT when running programs from within InkScape? 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).
lode leroy wrote:
Can anyone confirm if these work, or at least, are expected to work? I have created a path, and selected some of these effects, but I see no result. Is there a way to get some feedback? (like --verbose from the command line?)
BTW, I'm trying out Inkscape-0.41+0.42pre1-1.win32.exe on WinXP-SP1
The work again. The bug has been fixed. http://sourceforge.net/tracker/index.php?func=detail&aid=1234565&gro...
Aaron Spike
participants (4)
-
unknown@example.com
-
Jasper van de Gronde
-
lode leroy
-
Ted Gould