Fixed clear_screen() under Windows

This commit is contained in:
2Shirt 2019-09-13 20:47:27 -07:00
parent 4d6fad82db
commit 3d95d9c1a1
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -468,7 +468,7 @@ def choice(choices, prompt='答えろ!'):
def clear_screen():
"""Simple wrapper for clear/cls."""
cmd = 'cls' if os.name == 'nt' else 'clear'
subprocess.run(cmd, check=False, stderr=subprocess.PIPE)
subprocess.run(cmd, check=False, shell=True, stderr=subprocess.PIPE)
def format_exception_message(_exception, indent=INDENT, width=WIDTH):