From a9454ebabd0fab409d71eec41eea1a6eade84593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Wed, 6 Oct 2021 10:21:42 +0800 Subject: [PATCH] subprocess.run: encoding -> text=True --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c213e3..94f8ada 100644 --- a/README.md +++ b/README.md @@ -1703,7 +1703,7 @@ import os #### Sends '1 + 1' to the basic calculator and captures its output: ```python >>> from subprocess import run ->>> run('bc', input='1 + 1\n', capture_output=True, encoding='utf-8') +>>> run('bc', input='1 + 1\n', capture_output=True, text=True) CompletedProcess(args='bc', returncode=0, stdout='2\n', stderr='') ```