SpringField
SpringField

Reputation: 127

How to add/wait for user input?

How do you limit the input to 6 characters as well as catch if any special characters were inserted?

Upvotes: 0

Views: 173

Answers (1)

Ofir Israel
Ofir Israel

Reputation: 3913

Do you mean raw_input() ? (http://docs.python.org/2/library/functions.html#raw_input)

EDITED TO ADD:

Try something like this:

if len(sys.argv) > 1:
    ssid_end = sys.argv[1].lower()
else:
    ssid_end = raw_input("==> ").lower()

Upvotes: 1

Related Questions