Created
December 10, 2020 02:49
-
-
Save Oschangkai/564c8f5615addfedc63f2211f380ce90 to your computer and use it in GitHub Desktop.
Clean __pycache__ folder and files on any platform
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
python -Bc "import pathlib; [p.unlink() for p in pathlib.Path('.').rglob('*.py[co]')]" | |
python -Bc "import pathlib; [p.rmdir() for p in pathlib.Path('.').rglob('__pycache__')]" | |
# ref: https://stackoverflow.com/questions/28991015/python3-project-remove-pycache-folders-and-pyc-files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment