On Tue, Jan 4, 2011 at 1:56 PM, Ned Deily wrote:
> In article
> ,
> Chris Weisiger wrote:
> > I want to sanitize some strings (e.g. escape apostrophes, spaces, etc.)
> > before passing them to the commandline via subprocess. Unfortunately I
> can't
> > seem to find any built-in function to do t
In article
,
Chris Weisiger wrote:
> I want to sanitize some strings (e.g. escape apostrophes, spaces, etc.)
> before passing them to the commandline via subprocess. Unfortunately I can't
> seem to find any built-in function to do this. Am I really going to have to
> write up my own sanitizer? N
A friend just pointed me to pipes.quote(). Is there any reason I shouldn't
just use that?
And given the number of rather simple things that are already in the
standard library (e.g. capitalize the first letter of a string), simplicity
isn't really an excuse for excluding this functionality. Especi
On 04Jan2011 12:21, Chris Weisiger wrote:
| I want to sanitize some strings (e.g. escape apostrophes, spaces, etc.)
| before passing them to the commandline via subprocess. Unfortunately I can't
| seem to find any built-in function to do this. Am I really going to have to
| write up my own sanitiz