def find_strings(filename):
 d = {}
 prev_ttype = token.INDENT
 f = open(filename)
 for (ttype, tstr, start, end, line) in tokenize.generate_tokens(f.readline):
  if (ttype == token.STRING):
   if (prev_ttype == token.INDENT):
    (sline, scol) = start
    (eline, ecol) = end
    for i in range(sline, (eline + 1)):
     d[i] = 1
  prev_ttype = ttype
 f.close()
 return d

def find_strings ( filename ) : d = { } prev_ttype = token . INDENT f = open ( filename ) for ( ttype , tstr , start , end , line ) in tokenize . generate_tokens ( f . readline ) : if ( ttype == token . STRING ) : if ( prev_ttype == token . INDENT ) : ( sline , scol ) = start ( eline , ecol ) = end for i in range ( sline , ( eline + 1 ) ) : d [ i ] = 1 prev_ttype = ttype f . close ( ) return d
return a dict of possible docstring positions .