parameters: (argv)
docstring: main program - display list of images
docstring_summary: main program - display list of images
docstring_tokens: main program - display list of images
function: def main(argv):
      """main program - display list of images"""
  
      epd = EPD()
  
      epd.clear()
  
      print('panel = {p:s} {w:d} x {h:d}  version={v:s}'.format(p=epd.panel, w=epd.width, h=epd.height, v=epd.version))
  
      # initially set all white background
      image = Image.new('1', epd.size, WHITE)
  
      # prepare for drawing
      draw = ImageDraw.Draw(image)
  
      # set a longer timeout on socket operations
      socket.setdefaulttimeout(60)
  
      # find some fonts
      # fonts are in different places on Raspbian/Angstrom so search
      possible_name_fonts = [
  #        '/usr/share/fonts/truetype/freefont/FreeSans.ttf',                # R.Pi
          '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf',   # R.Pi
          '/usr/share/fonts/truetype/freefont/FreeMono.ttf',                # R.Pi
          '/usr/share/fonts/truetype/LiberationMono-Bold.ttf',              # B.B
          '/usr/share/fonts/truetype/DejaVuSansMono-Bold.ttf'               # B.B
          '/usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf'                    # Arch
      ]
  
      possible_message_fonts = [
          '/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf',      # R.Pi
          '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf',            # R.Pi
          '/usr/share/fonts/truetype/freefont/FreeMono.ttf',                # R.Pi
          '/usr/share/fonts/truetype/LiberationSans-Regular.ttf',           # B.B
          '/usr/share/fonts/truetype/DejaVuSans.ttf'                        # B.B
          '/usr/share/fonts/TTF/DejaVuSans.ttf'                             # Arch
      ]
  
  
      name_font_name = find_font(possible_name_fonts)
      if '' == name_font_name:
          raise 'no name font file found'
  
      message_font_name = find_font(possible_message_fonts)
      if '' == message_font_name:
          raise 'no message font file found'
  
      name_font = ImageFont.truetype(name_font_name, 14)
      message_font = ImageFont.truetype(message_font_name, 12)
  
      # start up tweepy streaming
  
      if tweepy_auth.basic:
          auth = tweepy.BasicAuthHandler(tweepy_auth.USERNAME, tweepy_auth.PASSWORD)
      else:
          auth = tweepy.OAuthHandler(tweepy_auth.CONSUMER_KEY, tweepy_auth.CONSUMER_SECRET)
          auth.set_access_token(tweepy_auth.ACCESS_TOKEN, tweepy_auth.ACCESS_TOKEN_SECRET)
  
      listener = StreamMonitor(epd, image, draw, name_font, message_font)
      stream = tweepy.Stream(auth, listener)
      setTerms = argv
      # stream.sample()   # low bandwidth public stream
      stream.filter(track=setTerms)
function_tokens: def main ( argv ) : epd = EPD ( ) epd . clear ( ) print ( 'panel = {p:s} {w:d} x {h:d}  version={v:s}' . format ( p = epd . panel , w = epd . width , h = epd . height , v = epd . version ) ) # initially set all white background image = Image . new ( '1' , epd . size , WHITE ) # prepare for drawing draw = ImageDraw . Draw ( image ) # set a longer timeout on socket operations socket . setdefaulttimeout ( 60 ) # find some fonts # fonts are in different places on Raspbian/Angstrom so search possible_name_fonts = [ #        '/usr/share/fonts/truetype/freefont/FreeSans.ttf',                # R.Pi '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf' , # R.Pi '/usr/share/fonts/truetype/freefont/FreeMono.ttf' , # R.Pi '/usr/share/fonts/truetype/LiberationMono-Bold.ttf' , # B.B '/usr/share/fonts/truetype/DejaVuSansMono-Bold.ttf' # B.B '/usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf' # Arch ] possible_message_fonts = [ '/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf' , # R.Pi '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf' , # R.Pi '/usr/share/fonts/truetype/freefont/FreeMono.ttf' , # R.Pi '/usr/share/fonts/truetype/LiberationSans-Regular.ttf' , # B.B '/usr/share/fonts/truetype/DejaVuSans.ttf' # B.B '/usr/share/fonts/TTF/DejaVuSans.ttf' # Arch ] name_font_name = find_font ( possible_name_fonts ) if '' == name_font_name : raise 'no name font file found' message_font_name = find_font ( possible_message_fonts ) if '' == message_font_name : raise 'no message font file found' name_font = ImageFont . truetype ( name_font_name , 14 ) message_font = ImageFont . truetype ( message_font_name , 12 ) # start up tweepy streaming if tweepy_auth . basic : auth = tweepy . BasicAuthHandler ( tweepy_auth . USERNAME , tweepy_auth . PASSWORD ) else : auth = tweepy . OAuthHandler ( tweepy_auth . CONSUMER_KEY , tweepy_auth . CONSUMER_SECRET ) auth . set_access_token ( tweepy_auth . ACCESS_TOKEN , tweepy_auth . ACCESS_TOKEN_SECRET ) listener = StreamMonitor ( epd , image , draw , name_font , message_font ) stream = tweepy . Stream ( auth , listener ) setTerms = argv # stream.sample()   # low bandwidth public stream stream . filter ( track = setTerms )