Skip to content

Instantly share code, notes, and snippets.

@tsabat
Created February 8, 2012 23:37
Show Gist options
  • Save tsabat/1775451 to your computer and use it in GitHub Desktop.
Save tsabat/1775451 to your computer and use it in GitHub Desktop.
luke filewalker
import os
def walk(root, is_inside=False):
for item in os.listdir(root):
if is_project(root, item):
print "%s is a project" %item
def is_project(root, item):
return os.path.isdir(os.path.join(root,item,"etc")) and os.path.isdir(os.path.join(root,item,".git"))
root = "/home/vagrant/playground"
walk(root)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment