[Dev-luatex] os.spawn and argv with sapces
jfine at pytex.org
Mon Nov 23 23:31:27 CET 2009
Taco Hoekwater wrote:
> Hi Tomek,
> T T wrote:
>> I have encountered a problem with os.spawn(arg) on Windows. If
>> arg='foo bar' and arg=nil, then the spawned process gets 'foo'
>> as argv and 'bar' as argv. This might be expected, since
>> according to docs, os.spawn doesn't do any argument processing.
> Let's put it this way: windows command line processing does not
> agree with my neurons, so I have stayed way from it as much as
> possible (and will continue to do so).
> A good, clean patch would be welcome of course, but I myself will not
> spend any more time on the stuff, not even for bug reports, as all that
> would be accomplished by doing so is that it would give me a headache,
> and there are much more pleasing ways to reach that state.
The Python community have solved this problem, with the subprocess module.
To quote from that URL
The subprocess module allows you to spawn new processes, connect to
their input/output/error pipes, and obtain their return codes. This
module intends to replace several other, older modules and functions,
The specification for subprocess is at
If anyone would like to create a module for lua to solve the problem of
filenames with spaces then Python's subprocess would be a good place to
More information about the dev-luatex