<s> '''<STR_LIT>''' <EOL> import sys <EOL> import os <EOL> import getopt <EOL> try : <EOL> for p in os . environ [ '<STR_LIT>' ] . split ( '<STR_LIT::>' ) : <EOL> if not p in sys . path : <EOL> sys . path . append ( p ) <EOL> except : <EOL> pass <EOL> try : <EOL> sys . path . append ( os . path . join ( os . environ [ '<STR_LIT>' ] , '<STR_LIT:src>' ) ) <EOL> except : <EOL> pass <EOL> from com . dtmilano . android . viewclient import ViewClient <EOL> HELP = '<STR_LIT>' <EOL> VERBOSE = '<STR_LIT>' <EOL> IGNORE_SECURE_DEVICE = '<STR_LIT>' <EOL> FORCE_VIEW_SERVER_USE = '<STR_LIT>' <EOL> DO_NOT_START_VIEW_SERVER = '<STR_LIT>' <EOL> SHORT_OPTS = '<STR_LIT>' <EOL> LONG_OPTS = [ HELP , VERBOSE , IGNORE_SECURE_DEVICE , FORCE_VIEW_SERVER_USE , DO_NOT_START_VIEW_SERVER ] <EOL> def usage ( exitVal = <NUM_LIT:1> ) : <EOL> print >> sys . stderr , '<STR_LIT>' % tuple ( LONG_OPTS ) <EOL> sys . exit ( exitVal ) <EOL> try : <EOL> opts , args = getopt . getopt ( sys . argv [ <NUM_LIT:1> : ] , SHORT_OPTS , LONG_OPTS ) <EOL> except getopt . GetoptError , e : <EOL> print >> sys . stderr , '<STR_LIT>' , str ( e ) <EOL> usage ( ) <EOL> kwargs1 = { VERBOSE : False , '<STR_LIT>' : False } <EOL> kwargs2 = { '<STR_LIT>' : True , '<STR_LIT>' : True , '<STR_LIT>' : False } <EOL> for o , a in opts : <EOL> o = o . strip ( '<STR_LIT:->' ) <EOL> if o in [ '<STR_LIT:H>' , HELP ] : <EOL> usage ( <NUM_LIT:0> ) <EOL> elif o in [ '<STR_LIT>' , VERBOSE ] : <EOL> kwargs1 [ VERBOSE ] = True <EOL> elif o in [ '<STR_LIT:I>' , IGNORE_SECURE_DEVICE ] : <EOL> kwargs1 [ '<STR_LIT>' ] = True <EOL> elif o in [ '<STR_LIT:F>' , FORCE_VIEW_SERVER_USE ] : <EOL> kwargs2 [ '<STR_LIT>' ] = True <EOL> elif o in [ '<STR_LIT:S>' , DO_NOT_START_VIEW_SERVER ] : <EOL> kwargs2 [ '<STR_LIT>' ] = False <EOL> print ViewClient ( * ViewClient . connectToDeviceOrExit ( ** kwargs1 ) , ** kwargs2 ) . list ( ) </s>
