def externals_finder(dirname, filename):
found = False<EOL>f = open(filename,'<STR_LIT>')<EOL>for line in iter(f.readline, '<STR_LIT>'):    <EOL><INDENT>parts = line.split()<EOL>if len(parts)==<NUM_LIT:2>:<EOL><INDENT>kind,length = parts<EOL>data = f.read(int(length))<EOL>if kind=='<STR_LIT>' and data=='<STR_LIT>':<EOL><INDENT>found = True<EOL><DEDENT>elif kind=='<STR_LIT>' and found:<EOL><INDENT>f.close()<EOL>break<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>f.close()<EOL>return<EOL><DEDENT>for line in data.splitlines():<EOL><INDENT>parts = line.split()<EOL>if parts:<EOL><INDENT>yield joinpath(dirname, parts[<NUM_LIT:0>])<EOL><DEDENT><DEDENT>
Find any 'svn:externals' directories