diff --git a/contrib/clean_pyc.bat b/contrib/clean_pyc.bat new file mode 100644 index 00000000..e4436dea --- /dev/null +++ b/contrib/clean_pyc.bat @@ -0,0 +1,11 @@ +@echo off +:: Display information +echo This script will remove *.pyc files. These files are generated by Python, but they can cause conflicts after an upgrade. It's safe to remove them, because they will be regenerated. +echo Press enter to continue, or CTRL + C to quit. +pause + +cd ..\ +:: Remove *.pyc files +del /S *.pyc +:: Remove __pycache__ folders +for /d /r . %%d in (__pycache__) do @if exist "%%d" rd /s /q "%%d" \ No newline at end of file diff --git a/contrib/clean_pyc.sh b/contrib/clean_pyc.sh old mode 100755 new mode 100644 index 9283fb59..ea555159 --- a/contrib/clean_pyc.sh +++ b/contrib/clean_pyc.sh @@ -5,5 +5,7 @@ echo "This script will remove *.pyc files. These files are generated by Python, echo "Press enter to continue, or CTRL + C to quit." read -# Remove the *.pyc -find "`dirname $0`/.." -type f -name "*.pyc" -exec rm -rf {} \; \ No newline at end of file +# Remove *.pyc files +find "`dirname $0`/.." -type f -name "*.pyc" -exec rm -rf {} \; +# Remove __pycache__ folders +find "`dirname $0`/.." -type d -name "__pycache__" -exec rm -rf {} \; \ No newline at end of file