Created
May 21, 2013 07:15
-
-
Save checko/5618034 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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