Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10820
| References | <51b2d157-3fea-4f8e-80b4-e7142629eca8@s21g2000pre.googlegroups.com> <CAMZYqRTZ9hJcf+TpHoKMcNCq6i1_HpAnkK9OBU21g-g6_bKCug@mail.gmail.com> |
|---|---|
| Date | 2011-08-03 11:04 -0700 |
| Subject | Re: Snippet: The leanest Popen wrapper |
| From | Phlip <phlip2005@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1858.1312394695.1164.python-list@python.org> (permalink) |
> flatten() being defined as...?
Python Cookbook recipe 4.6
def flatten(sequence): # CONSIDER: Reconcile with utils...
for item in sequence:
if isinstance(item, (list, tuple)):
for subitem in flatten(list(item)):
yield subitem
else:
yield item
>> shell= True,
> I would strongly encourage you to avoid shell=True. You really don't
> want to have to worry about doing proper shell escaping yourself.
Tx for helping me avoid reading up on it. I just copied it in.
I keep getting "fab not found" etc. when running 'fab command' thru
it. So then I ditch to os.system().
The long-term solution would be 'bash', '-c', 'yack yack yack' if you
want truly shelly things!
--
Phlip
http://c2.com/cgi/wiki?ZeekLand
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Snippet: The leanest Popen wrapper Phlip <phlip2005@gmail.com> - 2011-08-03 08:29 -0700
Re: Snippet: The leanest Popen wrapper Peter Otten <__peter__@web.de> - 2011-08-03 18:21 +0200
Re: Snippet: The leanest Popen wrapper Thomas Jollans <t@jollybox.de> - 2011-08-03 18:39 +0200
Re: Snippet: The leanest Popen wrapper Chris Rebert <clp2@rebertia.com> - 2011-08-03 10:27 -0700
Re: Snippet: The leanest Popen wrapper Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-08-04 10:10 +0200
Re: Snippet: The leanest Popen wrapper Chris Rebert <clp2@rebertia.com> - 2011-08-04 01:42 -0700
Re: Snippet: The leanest Popen wrapper Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-08-04 11:25 +0200
Re: Snippet: The leanest Popen wrapper Phlip <phlip2005@gmail.com> - 2011-08-03 11:04 -0700
Re: Snippet: The leanest Popen wrapper Terry Reedy <tjreedy@udel.edu> - 2011-08-03 16:20 -0400
Re: Snippet: The leanest Popen wrapper Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-08-04 10:24 +0200
Re: Snippet: The leanest Popen wrapper Yves-Gwenael Bourhis <ybourhis@distroiwork4.com> - 2011-08-04 15:19 +0200
csiph-web