> for t in os.walk(somedir): > t[1][:]=set(t[1])-{'.svn','tmp'} > ... do something > > This is a very clever hack but... it relies on internal implementation > of os.walk....
This doesn't appear to be an internal implementation detail; this is documented behavior. http://docs.python.org/dev/library/os.html#os.walk shows a similar example: for root, dirs, files in os.walk('python/Lib/email'): # ... dirs.remove('CVS') # don't visit CVS directories -- Michael Urman _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com