1

I am trying to make a small Python function that I want to simulate a loading piece. I have an array containing ['|', '\','--','/'] to use the slashes as the loading characters. I strive to re-create the msfconsole's loading page from Metasploit as shown in this image:

screenshot

Here is the current code that I have:

def loadingSlash(time):
    import time
    chars = [
        '|',
        time.sleep(time),
        '/',
        time.sleep(time),
        '--',
        time.sleep(time),
        '\\'
    ]

    chars_clean = ''.join(chars)

pass

loadingSlash(.5)

Sorry if the code is way off, I don't usually have to deal with arrays :P

martineau
  • 119,623
  • 25
  • 170
  • 301

0 Answers0