Added set_title()

* Only Windows is supported ATM
This commit is contained in:
2Shirt 2019-08-06 19:49:30 -06:00
parent a60e298f02
commit a0027122c9
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -280,6 +280,14 @@ def print_warning(msg, **kwargs):
print_colored([msg], ['YELLOW'], **kwargs)
def set_title(title):
"""Set window title."""
if os.name == 'nt':
os.system('title {}'.format(title))
else:
raise NotImplementedError
def sleep(seconds=2):
"""Simple wrapper for time.sleep."""
time.sleep(seconds)