Eryk Sun added the comment:
The Windows console has a fixed number of history buffers. In Windows 7 the
default maximum is four history buffers. In this case, if we run a script via
cmd.exe -> py.exe -> python.exe, then only one history buffer remains for a
child process. As you've observed,
New submission from 零欸特 :
Windows 7 x64
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit
(AMD64)]
Steps to reproduce:
1. Create a script:
```
from subprocess import run
run(["cmd.exe", "/c", "python"])
run(["python"])
run("python", shell=True)