os.system limitations on Windows NT
kohler at medien.tecmath.de
Fri Oct 27 10:13:31 CEST 2000
Alex Martelli schrieb in Nachricht <8t6d5408j3 at news1.newsguy.com>...
>"Markus Kohler" <kohler at cms.tecmath.de> wrote in message
>news:39F6A9CE.80407 at cms.tecmath.de...
>> I trying to execute a command with a large list of arguments.
>> When I do os.system("link " + args) the program crashes.
>> When I write the arguments to a file (fileName) and use
>> os.system ("link @" + fileName)
>> the arguments are truncated at an arbitrary point.
>That depends on your system (and on the link program you
>use; it appears from the @-convention for automatic
>response files, that you may be using some link.exe under
>some Microsoft operating system). The link.exe that
>comes with VC++6 is apparently able to take huge amounts
>of arguments in an automatic-response-file (@filename).
Yes that is exactly what I'm trying already.
But what puzzles me is that it doesn't work when I call
"link @filename" from Python.
It truncates what is in the file.
>I'm not sure, but I think you may be able to download
>that recent version of link.exe as a part of the freely
>downloadable "Microsoft Platform SDK" at Microsoft's
>website. Otherwise, the only solution I can think of
>(taking advantage of a linker's specific semantics)
>is to proceed in steps, grouping numbers of .obj files
>into temporary .lib ones (using LIB.EXE, in a MS
>setting), so the command arguments you eventually must
>pass to LINK.EXE are substantially shorter.
OK, but I really want to avoid this, because it is just more complicated.
More information about the Python-list