[Python-Dev] "Deprecation" of os.system in favor of subprocess?

Gregory P. Smith greg at krypto.org
Wed Oct 24 16:45:06 EDT 2018


The os module is by definition special.  It exposes libc and platform
APIs.  That there are Python modules that provide similar functionality,
often surpassing it and sometimes being built on top of it, is
intentional.  Random quotes from the Zen don't win arguments.  Although
practicality beats purity.  :P

os.system isn't going away.  That'd be unnecessarily disruptive.

-gps

On Wed, Oct 24, 2018 at 1:29 PM Steven D'Aprano <steve at pearwood.info> wrote:

> On Wed, Oct 24, 2018 at 09:34:34AM -0400, Calvin Spealman wrote:
>
> > Simply put, there is no valid use case for os.system over subprocess
>
> That is simply not true. That's your opinion, masquerading as a fact,
> and made in the face of Steve Dower's description of at least one
> appropriate use of os.system.
>
> If you depreciate and then remove os.system, all you will do is force
> people to re-invent it, badly and inefficiently.
>
>
> > by remaining it must be considered redundant.
>
> And neither is that.
>
> os.system is not redundant, as its purpose is different from that of
> subprocess.
>
>
>
> --
> Steve
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/greg%40krypto.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20181024/94fd2c26/attachment.html>


More information about the Python-Dev mailing list