################################## # Python Code For easy file access ################################## import os import time time1 = time.asctime() ############################################### print("") print(" |---------------|") print(" |Welcome .......|") # Displays Welcome MSG print(" |---------------|") print("") print("Started At:",time1) print("") ############################################### print(" |----|") print(" |Menu|") # Displays Options print(" |----|") print("") print(" |Input 1 |") print(" |Input 2 |") print(" |Input 3 |") print(" |Input 4 |") print(" |Input 5 |") ############################################## print("") def usersub(): # subroutine for user input global userchoice userchoice = input(" Input: ") # users Choice os.system('cls') print("") ################################################ usersub() # executes usersub subroutine ################################################ result = True # set th eresult loop to true while result: # a loop to allow options to be chosen in any order if userchoice == "1": # questions user choice os.startfile('#File path - use // not just / for path') # Opens file in path print("#File name") serverstat = 1 usersub() # Executes usersub after file opens to allow more than one use serverstat = 1 elif userchoice == "2": os.startfile('#File path') # Opens file in path print("#File name") usersub() elif userchoice == "3": os.startfile('#File path') # Opens file in path print("#File name") usersub() elif userchoice == "4": os.startfile('#File path') # Opens file in path print("#File name") usersub() elif userchoice == "5": os.system('cls') print("Goodbye ") print("") time.sleep(0.5) print("Closing In 3") time.sleep(1) print("Closing In 2") time.sleep(1) print("Closing In 1") time.sleep(1) quit() # quits the program else: print(" Thats Not a choice, Pick again.") usersub()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question