os.system limitations on Windows NT

Alex Martelli aleaxit at yahoo.com
Wed Oct 25 06:32:31 EDT 2000


"Markus Kohler" <kohler at cms.tecmath.de> wrote in message
news:39F6A9CE.80407 at cms.tecmath.de...
> Hi,
> 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).

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.


Alex






More information about the Python-list mailing list