Created
July 28, 2015 07:21
-
-
Save xcodebuild/72f4ad1d2387265f63df to your computer and use it in GitHub Desktop.
flask_watch_file.py
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
extra_dirs = ['./'] | |
extra_files = extra_dirs[:] | |
for extra_dir in extra_dirs: | |
for dirname, dirs, files in os.walk(extra_dir): | |
for filename in files: | |
filename = os.path.join(dirname, filename) | |
if os.path.isfile(filename) and os.path.splitext(filename)[1] in ['.py', '.html', '.js']: | |
extra_files.append(filename) | |
if __name__ == '__main__': | |
app.run(debug=True,extra_files=extra_files) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment