I'm trying to get the arguments of user input in python. I want to prompt the user to type something, and then store the words that they type in variables. I've tried doing 'sys.argv[1]' and 'cmd.argv[1]', but I just keep getting errors.
import sys
import os
print("Usage: .run <host> <time>")
cmd = input("[email protected]:~# ")
host = cmd.argv[2]
time = cmd.argv[3]
print("HOST: " + host)
print("TIME: " + time)