def extract_from_dir(dirname=None, method_map=DEFAULT_MAPPING, options_map=None, keywords=DEFAULT_KEYWORDS, comment_tags=(), callback=None, strip_comment_tags=False):
 if (dirname is None):
  dirname = os.getcwd()
 if (options_map is None):
  options_map = {}
 absname = os.path.abspath(dirname)
 for (root, dirnames, filenames) in os.walk(absname):
  for subdir in dirnames:
   if (subdir.startswith('.') or subdir.startswith('_')):
    dirnames.remove(subdir)
  dirnames.sort()
  filenames.sort()
  for filename in filenames:
   filepath = os.path.join(root, filename).replace(os.sep, '/')
   for message_tuple in check_and_call_extract_file(filepath, method_map, options_map, callback, keywords, comment_tags, strip_comment_tags, dirpath=absname):
    (yield message_tuple)

def extract_from_dir ( dirname = None , method_map = DEFAULT_MAPPING , options_map = None , keywords = DEFAULT_KEYWORDS , comment_tags = ( ) , callback = None , strip_comment_tags = False ) : if ( dirname is None ) : dirname = os . getcwd ( ) if ( options_map is None ) : options_map = { } absname = os . path . abspath ( dirname ) for ( root , dirnames , filenames ) in os . walk ( absname ) : for subdir in dirnames : if ( subdir . startswith ( '.' ) or subdir . startswith ( '_' ) ) : dirnames . remove ( subdir ) dirnames . sort ( ) filenames . sort ( ) for filename in filenames : filepath = os . path . join ( root , filename ) . replace ( os . sep , '/' ) for message_tuple in check_and_call_extract_file ( filepath , method_map , options_map , callback , keywords , comment_tags , strip_comment_tags , dirpath = absname ) : ( yield message_tuple )
extract messages from any source files found in the given directory .