Created
May 1, 2015 05:25
-
-
Save mapsam/6862e2cfe768e5af3e8c to your computer and use it in GitHub Desktop.
copy directory in flask
This file contains hidden or 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
import shutil | |
def copyDirectory(src, dest): | |
try: | |
shutil.copytree(src, dest) | |
# Directories are the same | |
except shutil.Error as e: | |
print('Directory not copied. Error: %s' % e) | |
# Any error saying that the directory doesn't exist | |
except OSError as e: | |
print('Directory not copied. Error: %s' % e) | |
copyDirectory('app/static/node_modules/bootstrap/dist/fonts', 'app/static/public/fonts/') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment