-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
from os.path import isdir, join | ||
|
||
root = "." | ||
finit = '__init__.py' | ||
finit = "__init__.py" | ||
|
||
|
||
def visitor(arg, dirname, fnames): | ||
fnames = [fname for fname in fnames if isdir(fname)] | ||
# here you could do some additional checks ... | ||
print "adding %s to : %s" %(finit, dirname) | ||
with open(join(dirname, finit), 'w') as file_: file_.write('') | ||
print("adding %s to : %s" % (finit, dirname)) | ||
with open(join(dirname, finit), "w") as file_: | ||
file_.write("") | ||
|
||
|
||
walk(root, visitor, None) | ||
walk(root, visitor, None) |