#NEWLINE# def walk_modules( self , basedir , modpath ) : #NEWLINE# #INDENT# for fn in sorted ( os . listdir ( basedir ) ) : #NEWLINE# #INDENT# path = os . path . join ( basedir , fn ) #NEWLINE# if os . path . isdir ( path ) : #NEWLINE# #INDENT# pkg_init = os . path . join ( path , '__init__.py' ) #NEWLINE# if os . path . exists ( pkg_init ) : #NEWLINE# #INDENT# ( yield ( pkg_init , ( modpath + fn ) ) ) #NEWLINE# for ( p , m ) in self . walk_modules ( path , ( ( self + fn ) + '.' ) ) : #NEWLINE# #INDENT# ( yield ( p , m ) ) #NEWLINE# #UNINDENT# #UNINDENT# continue #NEWLINE# #UNINDENT# if ( ( not fn . endswith ( '.py' ) ) or ( fn == '__init__.py' ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# ( yield ( path , ( modpath + fn [ : ( - 3 ) ] ) ) )