Skip to content

Commit a9454eb

Browse files
authored
subprocess.run: encoding -> text=True
1 parent bbde7a7 commit a9454eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1703,7 +1703,7 @@ import os
17031703
#### Sends '1 + 1' to the basic calculator and captures its output:
17041704
```python
17051705
>>> from subprocess import run
1706-
>>> run('bc', input='1 + 1\n', capture_output=True, encoding='utf-8')
1706+
>>> run('bc', input='1 + 1\n', capture_output=True, text=True)
17071707
CompletedProcess(args='bc', returncode=0, stdout='2\n', stderr='')
17081708
```
17091709

0 commit comments

Comments
 (0)