I have a python script which I have been piecing together (one of my first python forays).
The script recurses a folder looking for XCode project files; the script works fine, but I would like to adapt it to skip any .svn (or .hg or .git) folders so that it isn't trying to modify source repositories.
Here is the script for the recursive search
for root, dirnames, files in os.walk('.'):
files = [f for f in files if re.search("project\.pbxproj", f)]
for f in files:
filename = os.path.join(root, f)
print "Adjusting BaseSDK for %s" % (filename)
...
How can I exclude the repository sub-trees?
dirnames.remove(".svn")