def walk_python_files():
 def _is_dir_ignored(root, d):
  if d.startswith(u'.'):
   return True
  return (os.path.join(rel_root, d) in IGNORED_DIRS)
 for (abs_root, dirnames, filenames) in os.walk(PROJECT_ROOT):
  rel_root = os.path.relpath(abs_root, PROJECT_ROOT)
  if (rel_root == u'.'):
   rel_root = u''
  dirnames[:] = [d for d in dirnames if (not _is_dir_ignored(rel_root, d))]
  for filename in filenames:
   if (not filename.endswith(u'.py')):
    continue
   abs_name = os.path.join(abs_root, filename)
   rel_name = os.path.join(rel_root, filename)
   (yield (abs_name, rel_name))

def walk_python_files ( ) : def _is_dir_ignored ( root , d ) : if d . startswith ( u'.' ) : return True return ( os . path . join ( rel_root , d ) in IGNORED_DIRS ) for ( abs_root , dirnames , filenames ) in os . walk ( PROJECT_ROOT ) : rel_root = os . path . relpath ( abs_root , PROJECT_ROOT ) if ( rel_root == u'.' ) : rel_root = u'' dirnames [ : ] = [ d for d in dirnames if ( not _is_dir_ignored ( rel_root , d ) ) ] for filename in filenames : if ( not filename . endswith ( u'.py' ) ) : continue abs_name = os . path . join ( abs_root , filename ) rel_name = os . path . join ( rel_root , filename ) ( yield ( abs_name , rel_name ) )
generator that yields all ckan python source files .