Added set_title()
* Only Windows is supported ATM
This commit is contained in:
parent
a60e298f02
commit
a0027122c9
1 changed files with 8 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue