Skip to content

Instantly share code, notes, and snippets.

@aahmed-se
Created September 22, 2017 19:15
Show Gist options
  • Save aahmed-se/d0511b76d695dd8354805fc146a3d791 to your computer and use it in GitHub Desktop.
Save aahmed-se/d0511b76d695dd8354805fc146a3d791 to your computer and use it in GitHub Desktop.
Create __init__.py under all folders in a specific directory
LOCATION="."
FILE_NAME="/__init__.py"
for i in $(find $LOCATION -type d); do echo "__import__('pkg_resources').declare_namespace(__name__)" > $i$FILE_NAME; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment