#NEWLINE# def _iglob( self , pathname , rootcall = True ) : #NEWLINE# #INDENT# 'Internal implementation that backs :meth:`iglob`.\n\n        ``rootcall`` is required to differentiate between the user\'s call to\n        iglob(), and subsequent recursive calls, for the purposes of resolving\n        certain special cases of ** wildcards. Specifically, "**" is supposed\n        to include the current directory for purposes of globbing, but the\n        directory itself should never be returned. So if ** is the lastmost\n        part of the ``pathname`` given the user to the root call, we want to\n        ignore the current directory. For this, we need to know which the root\n        call is.\n        ' #NEWLINE# if ( not has_magic ( pathname ) ) : #NEWLINE# #INDENT# if self . exists ( pathname ) : #NEWLINE# #INDENT# ( yield ( pathname , ( ) ) ) #NEWLINE# #UNINDENT# return #NEWLINE# #UNINDENT# ( dirname , basename ) = os . path . split ( pathname ) #NEWLINE# if ( ( dirname != pathname ) and has_magic ( dirname ) ) : #NEWLINE# #INDENT# dirs = self . _iglob ( dirname , rootcall = False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# dirs = [ ( dirname , ( ) ) ] #NEWLINE# #UNINDENT# for ( dirname , dir_groups ) in dirs : #NEWLINE# #INDENT# for ( name , groups ) in self . resolve_pattern ( dirname , basename , ( not rootcall ) ) : #NEWLINE# #INDENT# ( yield ( os . path . join ( dirname , name ) , ( dir_groups + groups ) ) )