def interpreter(): while True: state, connection = get_state() points = ciu.ciu_points() print_cmd_prompts(state, connection, points) try: input = raw_input except NameError: pass cmd = input("command?: ") index = int_value(cmd) if index: password = "" if points[index-1]['security'] == 'encrypted': password = getpass('password: '******'ssid'], password) elif cmd == 'm': ssid = input("ssid?: ") password = getpass('password (if required)?: ') do_connect(ssid, password) else: try: commands[cmd].fn(connection) except KeyError: print("\nInvalid command\n")
def interpreter(): while True: state, connection = get_state() points = ciu.ciu_points() print_cmd_prompts(state, connection, points) cmd = raw_input("command?: ") index = int_value(cmd) if index: password = "" if points[index-1]['security'] == 'encrypted': password = getpass('password: '******'ssid'], password) elif cmd == 'm': ssid = raw_input("ssid?: ") password = getpass('password (if required)?: ') do_connect(ssid, password) else: ciu.ciu_activity() try: commands[cmd].fn(connection) except KeyError: print("\nInvalid command\n")
def interpreter(): while True: state, connection = get_state() points = ciu.ciu_points() print_cmd_prompts(state, connection, points) cmd = raw_input("command?: ") index = int_value(cmd) if index: password = "" if points[index - 1]['security'] == 'encrypted': password = getpass('password: '******'ssid'], password) else: ciu.ciu_activity() try: commands[cmd].fn(connection) except KeyError: print "\nInvalid command\n"
def index(): points = ciu.ciu_points() for point in points: point['ssid_encoded'] = urllib.quote_plus(point['ssid']) return render_template("index.html", points=points)
def index(): points = ciu.ciu_points() return render_template("index.html", points=points)
def index(self): tmpl = env.get_template('index.html') points = ciu.ciu_points() return tmpl.render(points=points)