<s> import sys <EOL> import bluetooth <EOL> if len ( sys . argv ) < <NUM_LIT:2> : <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> sys . exit ( <NUM_LIT:2> ) <EOL> target = sys . argv [ <NUM_LIT:1> ] <EOL> if target == "<STR_LIT:all>" : target = None <EOL> services = bluetooth . find_service ( address = target ) <EOL> if len ( services ) > <NUM_LIT:0> : <EOL> print "<STR_LIT>" % ( len ( services ) , sys . argv [ <NUM_LIT:1> ] ) <EOL> print <EOL> else : <EOL> print "<STR_LIT>" <EOL> for svc in services : <EOL> print "<STR_LIT>" % svc [ "<STR_LIT:name>" ] <EOL> print "<STR_LIT>" % svc [ "<STR_LIT:host>" ] <EOL> print "<STR_LIT>" % svc [ "<STR_LIT:description>" ] <EOL> print "<STR_LIT>" % svc [ "<STR_LIT>" ] <EOL> print "<STR_LIT>" % svc [ "<STR_LIT>" ] <EOL> print "<STR_LIT>" % svc [ "<STR_LIT:port>" ] <EOL> print "<STR_LIT>" % svc [ "<STR_LIT>" ] <EOL> print "<STR_LIT>" % svc [ "<STR_LIT>" ] <EOL> print "<STR_LIT>" % svc [ "<STR_LIT>" ] <EOL> print </s>
