add function to pause the output

This commit is contained in:
Andreas Zweili 2016-12-14 13:07:48 +01:00
parent f2a1b2a752
commit 5a104e517c
2 changed files with 8 additions and 3 deletions

View File

@ -7,8 +7,8 @@ chosen_activity = None
# The main menu starts there
interface_functions.configuration()
os.system('clear')
while chosen_activity != 0:
os.system('clear')
print("What would you like to do?")
# Start the chosen activity and go back to the activity selector.
print("1: List Backups, 2: Show archive details, 3: Mount Archive, "

View File

@ -13,7 +13,7 @@ def show_info():
os.system('clear')
os.system('borg info ::' + archive_name)
print()
input("Press a key to continue.")
pause()
def mount_archive():
archive_name = input("Please enter the archive name: ")
@ -22,8 +22,10 @@ def mount_archive():
os.makedirs(int_vars.mount_point)
os.system('borg mount ::' + archive_name + " " + int_vars.mount_point)
print()
print("Archive mounted at " + int_vars.mount_point + "/")
print("Archive mounted at " + int_vars.mount_point + "/.")
print("The archive will remain mounted as long this programm is running.")
print()
pause()
def restore_archive():
archive_name = input("Please enter the archive name: ")
@ -70,3 +72,6 @@ def exit():
print()
os.system('fusermount -u' + " " + int_vars.mount_point)
os.rmdir(int_vars.mount_point)
def pause():
input("Press any key to continue.")