Skip to content

Instantly share code, notes, and snippets.

@checko
Created May 21, 2013 07:15
Show Gist options
  • Save checko/5618034 to your computer and use it in GitHub Desktop.
Save checko/5618034 to your computer and use it in GitHub Desktop.
import os
foundpath = 0
def recursive_list( pathname ):
global foundpath
dirs = os.listdir( pathname )
if '.git' in dirs:
return
if not dirs:
print pathname
foundpath = foundpath + 1
return
for item in dirs:
itempath = os.path.join(pathname,item)
if os.path.isdir(itempath):
recursive_list( itempath )
for ii in os.listdir("."):
if ii not in ['out','.repo']:
iipath = os.path.join(".",ii)
if os.path.isdir(iipath):
recursive_list( iipath )
print foundpath, " found"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment