Added clear_screen()
This commit is contained in:
parent
5eaefb3e41
commit
11cf75d4a6
16 changed files with 21 additions and 17 deletions
|
|
@ -13,7 +13,7 @@ os.system('title {}: Windows Activation Tool'.format(KIT_NAME_FULL))
|
|||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: Windows Activation Tool\n'.format(KIT_NAME_FULL))
|
||||
# Bail early if already activated
|
||||
if windows_is_activated():
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ if __name__ == '__main__':
|
|||
try:
|
||||
# Prep
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
folder_path = r'{}\Backups'.format(KIT_NAME_SHORT)
|
||||
dest = select_destination(folder_path=folder_path,
|
||||
prompt='Which disk are we using for temp data and backup?')
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ global_vars['LogFile'] = r'{LogDir}\Check Disk.log'.format(**global_vars)
|
|||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
other_results = {
|
||||
'Error': {
|
||||
'CalledProcessError': 'Unknown Error',
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ global_vars['LogFile'] = r'{LogDir}\DISM helper tool.log'.format(**global_vars)
|
|||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
other_results = {
|
||||
'Error': {
|
||||
'CalledProcessError': 'Unknown Error',
|
||||
|
|
|
|||
|
|
@ -81,6 +81,10 @@ def ask(prompt='Kotaero!'):
|
|||
print_log(message=message)
|
||||
return answer
|
||||
|
||||
def clear_screen():
|
||||
"""Simple wrapper for cls."""
|
||||
os.system('cls')
|
||||
|
||||
def convert_to_bytes(size):
|
||||
"""Convert human-readable size str to bytes and return an int."""
|
||||
size = str(size)
|
||||
|
|
@ -259,7 +263,7 @@ def menu_select(title='~ Untitled Menu ~',
|
|||
answer = ''
|
||||
|
||||
while (answer.upper() not in valid_answers):
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print(menu_splash)
|
||||
answer = input('{}: '.format(prompt))
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ global_vars['LogFile'] = r'{LogDir}\Install SW Bundle.log'.format(**global_vars)
|
|||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: SW Bundle Tool\n'.format(KIT_NAME_FULL))
|
||||
other_results = {
|
||||
'Error': {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ global_vars['LogFile'] = r'{LogDir}\Install Visual C++ Runtimes.log'.format(**gl
|
|||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: Install Visual C++ Runtimes\n'.format(KIT_NAME_FULL))
|
||||
other_results = {
|
||||
'Error': {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ os.system('title {}: SafeMode Tool'.format(KIT_NAME_FULL))
|
|||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: SafeMode Tool\n'.format(KIT_NAME_FULL))
|
||||
if not ask('Enable booting to SafeMode (with Networking)?'):
|
||||
abort()
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ os.system('title {}: SafeMode Tool'.format(KIT_NAME_FULL))
|
|||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: SafeMode Tool\n'.format(KIT_NAME_FULL))
|
||||
if not ask('Disable booting to SafeMode?'):
|
||||
abort()
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ global_vars['LogFile'] = r'{LogDir}\SFC Tool.log'.format(**global_vars)
|
|||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: SFC Tool\n'.format(KIT_NAME_FULL))
|
||||
other_results = {
|
||||
'Error': {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ global_vars['LogFile'] = r'{LogDir}\System Checklist.log'.format(**global_vars)
|
|||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: System Checklist Tool\n'.format(KIT_NAME_FULL))
|
||||
ticket_number = get_ticket_number()
|
||||
other_results = {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ global_vars['LogFile'] = r'{LogDir}\System Diagnostics.log'.format(
|
|||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: System Diagnostics Tool\n'.format(KIT_NAME_FULL))
|
||||
ticket_number = get_ticket_number()
|
||||
other_results = {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ global_vars['LogFile'] = r'{LogDir}\Transferred Keys.log'.format(**global_vars)
|
|||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: Transferred Key Finder\n'.format(KIT_NAME_FULL))
|
||||
try_and_print(message='Searching for keys...',
|
||||
function=list_clientdir_keys, print_return=True)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ os.system('title {}: Kit Update Tool'.format(KIT_NAME_FULL))
|
|||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: Kit Update Tool\n'.format(KIT_NAME_FULL))
|
||||
other_results = {
|
||||
'Error': {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ global_vars['LogFile'] = r'{LogDir}\User Checklist ({USERNAME}).log'.format(
|
|||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: User Checklist\n'.format(KIT_NAME_FULL))
|
||||
other_results = {
|
||||
'Warning': {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ if __name__ == '__main__':
|
|||
try:
|
||||
# Prep
|
||||
stay_awake()
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('{}: User Data Transfer Tool\n'.format(KIT_NAME_FULL))
|
||||
ticket_number = get_ticket_number()
|
||||
folder_path = r'{}\Transfer'.format(KIT_NAME_SHORT)
|
||||
|
|
@ -26,7 +26,7 @@ if __name__ == '__main__':
|
|||
items = scan_source(source, dest)
|
||||
|
||||
# Transfer
|
||||
os.system('cls')
|
||||
clear_screen()
|
||||
print_info('Transfer Details:\n')
|
||||
show_info('Ticket:', ticket_number)
|
||||
show_info('Source:', source.path)
|
||||
|
|
|
|||
Loading…
Reference in a new issue