Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imports = ["sys", "time", "random"]
- i = 0
- while i < len(imports):
- try:
- module = __import__(imports[i])
- globals()[imports[i]] = module
- except NameError:
- print("modules not loaded")
- i += 1
- def loading(times, msg="Loading modules"):
- sys.stdout.write(msg)
- for i in range(times):
- sys.stdout.write('.')
- sys.stdout.flush()
- time.sleep(int(random.random()*1.9))
- loading(3)
Advertisement
Add Comment
Please, Sign In to add comment