[Python-Dev] "Deprecation" of os.system in favor of subprocess?
stephane at wirtel.be
Thu Oct 25 11:13:08 EDT 2018
After your feedback, I have my answer.
I understand the your points of view and I don't want to change any part
of code for os.system and subprocess, I don't want to deprecate
os.system in favor of subprocess. I just wanted to know your opinion
about this point.
+1 to use os.system when we only need a call without portability, just a
+1 for subprocess for the portability.
Thank you so much for your patience/time and your explanations.
On 10/24, Stephane Wirtel wrote:
>Good morning/afternoon/evening/night ;-)
>In the documentation of os.system , there is this paragraph, where we
>suggest to use subprocess instead of os.system.
>The subprocess module provides more powerful facilities for spawning new
>processes and retrieving their results; using that module is preferable
>to using this function. See the Replacing Older Functions with the
>subprocess Module section in the subprocess documentation for some
>But I have found some references (between 15 and 23 (if we include
>setup.py)) of os.system.
>Do we need to keep the code like that or could we start to use
>subprocess for these "references" because it is preferable?
>If you think we could move to subprocess, I would like to open an issue
>and try to fix it.
>1. Add the 'deprecated' directive in the doc
>2. Use subprocess for these references
>What is your opinion?
>Stéphane Wirtel - https://wirtel.be - @matrixise
>Python-Dev mailing list
>Python-Dev at python.org
Stéphane Wirtel - https://wirtel.be - @matrixise
More information about the Python-Dev