4 Jan
2002
4 Jan
'02
7:30 p.m.
Hi, 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 them*. It took me a good five minutes to figure out this problem and I'm sure that others have hit this gotcha. Cheers, Brian * 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']