[Distutils] Possible Distutils shell processing bug

Brian Quinlan brian@sweetapp.com
Fri Jan 4 19:30:02 2002


Is it intended that users must escape their own strings, which are
passed to the shell? As an example, if I wanted to define a string for
the preprocessor, I would have to do something like this:

defines = [('VERSION',r'\"1.2.3\"')]

If I hadn't escaped the double quotes then the shell would have removed

It took me a good five minutes to figure out this problem and I'm sure
that others have hit this gotcha.


python -c "import sys; print `sys.argv`" test
['-c', 'test']

python -c "import sys; print `sys.argv`" "test"
['-c', 'test']

python -c "import sys; print `sys.argv`" ""test""
['-c', 'test']