代码:
import os #os.system('python hello1.py') while 1: print("**************** ") print("**************** ") num = input("please input a num: ") try: print(num) if num == 'a': os.system('python hello1.py') if num == 2: os.system('python ') print(successful) if num == 3: os.system('python ') if num == 4: print("**************** ") print("**************** ") break except ValueError: print("It's not a num, Please enter again ")
用os组件函数实现