Skip to content

Commit c0910ec

Browse files
author
miguel
committed
clear screen multiplatform
1 parent df9e1a4 commit c0910ec

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

password_manager.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,13 @@ class EncryptionException(PasswordManagerException):
8787
"""Cannot encrypt data!"""
8888

8989

90-
def clear_screen():
91-
os.system('reset')
90+
# https://stackoverflow.com/questions/1854/python-what-os-am-i-running-on
91+
if platform.system() == "Windows":
92+
def clear_screen():
93+
os.system('cls')
94+
else:
95+
def clear_screen():
96+
os.system('reset')
9297

9398

9499
def warn_print(s):
@@ -724,6 +729,8 @@ def _command_clear(self):
724729
def _command_exit(self):
725730
"""Exit"""
726731

732+
print "hola"
733+
clear_screen()
727734
exit()
728735

729736
@cmd("random_pass")

0 commit comments

Comments
 (0)