Skip to content

Instantly share code, notes, and snippets.

@dietmarw
Created October 13, 2008 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dietmarw/16547 to your computer and use it in GitHub Desktop.
Save dietmarw/16547 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import os
dirs = open("list.txt","r")
filename = ".gitignore"
for line in dirs:
directory = line.strip()
#if not filename in os.listdir(os.path.abspath(directory)):
try:
os.makedirs(directory)
except OSError:
pass
f = open(directory+os.sep+filename,"w")
f.close()
dirs.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment