Added clear_screen()
This commit is contained in:
parent
9da283f7fc
commit
ac7fcb2e0b
1 changed files with 8 additions and 0 deletions
|
|
@ -47,6 +47,14 @@ def ask(prompt='Kotaero!'):
|
|||
return answer
|
||||
|
||||
|
||||
def clear_screen():
|
||||
"""Simple wrapper for clear/cls."""
|
||||
if os.name == 'nt':
|
||||
os.system('cls')
|
||||
else:
|
||||
os.system('clear')
|
||||
|
||||
|
||||
def input_text(prompt='Enter text'):
|
||||
"""Get text from user, returns string."""
|
||||
prompt = str(prompt)
|
||||
|
|
|
|||
Loading…
Reference in a new issue