Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion shutil.runret and shutil.runout
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mike Meyer  
View profile  
 More options Feb 24 2012, 6:25 am
From: Mike Meyer <m...@mired.org>
Date: Fri, 24 Feb 2012 06:25:25 -0500
Local: Fri, Feb 24 2012 6:25 am
Subject: Re: [Python-ideas] shutil.runret and shutil.runout
On Fri, 24 Feb 2012 12:10:08 +0100

Tarek Ziadé <ziade.ta...@gmail.com> wrote:
> On Fri, Feb 24, 2012 at 11:52 AM, anatoly techtonik <techto...@gmail.com>wrote:
> > Hello,
> > subprocess is low level, cryptic, does too much, with poor usability,
> > i.e. "don't make me think" is not about it. I don't know about you,
> > but I can hardly write any subprocess call without spending at least
> > 5-10 meditating over the documentation. So, I propose two high level
> > KISS functions for shell utils (shutil) module:
> > runret(command)   - run command through shell, return ret code
> mmm you are describing subprocess.call()  here... I don't see how this new
> command makes thing better, besides shell=True.

The stated purpose of the new functions is to allow people to run
shell commands without thinking about them. That's a bad idea (isn't
most programming without thinking about it?). The first problem is
that it's a great way to add data injection vulnerabilities to your
application. It's also a good way to introduce bugs in your
application when asked to (for instance) process user-provided file
names.

-1

        <mike
--
Mike Meyer <m...@mired.org>               http://www.mired.org/
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.