Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42864 > unrolled thread

Re: os.system() with imbeded quotes on centos

Started byCameron Simpson <cs@zip.com.au>
First post2013-04-06 10:53 +1100
Last post2013-04-06 10:53 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: os.system() with imbeded quotes on centos Cameron Simpson <cs@zip.com.au> - 2013-04-06 10:53 +1100

#42864 — Re: os.system() with imbeded quotes on centos

FromCameron Simpson <cs@zip.com.au>
Date2013-04-06 10:53 +1100
SubjectRe: os.system() with imbeded quotes on centos
Message-ID<mailman.169.1365206046.3114.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web