Ted Gould wrote:
On Fri, 2008-01-11 at 13:28 -0600, Aaron Spike wrote:
Ted Gould wrote:
On Fri, 2008-01-11 at 08:48 -0600, Aaron Spike wrote:
But I think we need to put debug prints in Inkscape to see what the actual command line is that inkscape generates because when I give the same command line options to a simple python script like:
We don't generate a command line anymore. It's a function call with parameter passed individually as a list. This is a direct call, so there is now shell f#$%$ing with the parameters.
So that's kinda what makes things odd to me, there is no parsing that should need to be done. Perhaps that's what the helper.exe's do in GTK +, turn everything back into command lines. I'd actually look at those to see how they handle the parameters. This may be a GTK+ win32 bug.
"On Windows, the low-level child process creation API (CreateProcess())doesn't use argument vectors, but a command line. The C runtime library's spawn*() family of functions (which g_spawn_async_with_pipes() eventually calls) paste the argument vector elements into a command line, and the C runtime startup code does a corresponding reconstruction of an argument vector from the command line, to be passed to main(). Complications arise when you have argument vector elements that contain spaces of double quotes. The spawn*() functions don't do any quoting or escaping, but on the other hand the startup code does do unquoting and unescaping in order to enable receiving arguments with embedded spaces or double quotes. To work around this asymmetry, g_spawn_async_with_pipes() will do quoting and escaping on argument vector elements that need it before calling the C runtime spawn() function."
http://www.gtk.org/api/2.6/glib/glib-Spawning-Processes.html#g-spawn-async-w...
What's that mean? If we put the filename on the right end of the list can we cause it to be the final argument passed the scripts?
Well, moving the file name shouldn't be a big deal. But I'm not sure about your other parsing issue. It sounds like on windows it does come down to a command line. FWIW we're using async_with_pipes.
Does this work properly on linux? I can't test right now because my linux box died last weekend. Is there anyway we can capture the command line on windows to get a better idea of what is actually happening?
Aaron