should these be fixed for python 2.4?
jeff at ccvcorp.com
Sat Oct 2 01:16:01 CEST 2004
Alexander Schmolck wrote:
>I think who got it righter depends the respective ratios of buggy code; I'd be
>not be surprised if only a fraction of python code that simply attempts to run
>an external command with certain arguments (and no shell preprocessing) worked
>I appreciate your point but I suspect that at the moment many people are
>extremely likely to do the wrong thing, because it's much more obvious than
>the right thing.
Personally, I suspect that the number of people who're running external
commands that are complex enough for these escaping issues to matter is
rather small. The vast majority of uses of os.system() (IMHO) are very
simple cases with one or two simple arguments. Relatively few of them
involve filenames that contain spaces, or other things that might cause
problems with the naive os.system('cmd %s %s' % (arg1, arg2)) sort of
At least, *I've* never personally found myself in a situation where I
wanted to execute an external command, and in which I needed to worry
about escaping/quoting the command string. It's an open question
whether your experience is more typical than mine, I guess...
More information about the Python-list