Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #42864
| Date | 2013-04-06 10:53 +1100 |
|---|---|
| From | Cameron Simpson <cs@zip.com.au> |
| Subject | Re: os.system() with imbeded quotes on centos |
| References | <CAMZYqRTkNYpD3jvx+xNsG4x2oHA7fzxbun-W112tRthAiNZ-eg@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.169.1365206046.3114.python-list@python.org> (permalink) |
On 05Apr2013 16:36, Chris Rebert <clp2@rebertia.com> wrote:
| No need for third-party code, just use the std lib:
| http://docs.python.org/2/library/pipes.html#pipes.quote
| http://docs.python.org/3/library/shlex.html#shlex.quote
Ah, handy. I must say its quote quoting is kind of verbose, though.
| (But yeah, best of all is to just use `subprocess` with shell=False.)
Cheers,
--
Cameron Simpson <cs@zip.com.au>
Plague, Famine, Pestilence, and C++ stalk the land. We're doomed! Doomed!
- Simon E Spero
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: os.system() with imbeded quotes on centos Cameron Simpson <cs@zip.com.au> - 2013-04-06 10:53 +1100
csiph-web