[Twisted-Python] Windows <strike>i hate it</strike> Process API
Andrew Bennetts
andrew-twisted at puzzling.org
Tue Apr 8 07:56:29 MDT 2003
On Mon, Apr 07, 2003 at 10:49:19PM -0400, Christopher Armstrong wrote:
> So, I've discovered[1] something new about Windows. Basically, there's
> no such thing as `argv' in win32-land, and each program has to parse
> its command-line manually (I had known that they had to do wild-card
> expansion manually, but not parse the entire damned string). This
> isn't so much the problem as there is no sane Win32 API for starting a
> process with a sequence of arguments. The reason this is a problem is
> that Twisted's Process API uses sequences of arguments.
>
> In light of this, I have a few somewhat-orthogonal proposals to make,
> but I think they should all be done (well, except, perhaps, the last):
Do you have a use-case where the current string-joining breaks? And if a
Twisted user really cared about passing arguments on Win32, wouldn't it be
easiest to just let them take care of it, e.g.:
if sys.platform == 'win32':
args = ["one big string"]
else:
args = ["one", "big", string"]
...
?
I'm not sure that adding lots of platform-dependent infrastructure to
Twisted can offer anything better than that, anyway, so we may as well keep
it simple.
I'm willing to be proved wrong, though -- it's not like I use Win32 anymore
:)
-Andrew.
More information about the Twisted-Python
mailing list