3 # Author: Martin Matusiak <numerodix@gmail.com>
4 # Licensed under the GNU Public License, version 3.
6 from conf
import config
17 p
= opts
.create_parser()
18 p
.add_option("-i", "--interface", dest
="interface", action
="append",
19 metavar
="iface", help="Prefer this interface")
20 p
.add_option("-t", "--timeout", dest
="timeout", action
="store",
21 metavar
="s", help="Scan for this many seconds, then exit")
29 iface
= config
.interfaces
.get_top(pred
=lambda x
: x
.medium
== "wireless")
32 timeout
= int(config
.opts
.get('timeout', -1))
34 ui
.curse(iface
.interface
, timeout
)
38 if __name__
== "__main__":