if (( $+commands[python3] )); then alias py='python3' fi function pyclean() { find "${@:-.}" -type f -name "*.py[co]" -delete find "${@:-.}" -type d -name "__pycache__" -delete find "${@:-.}" -depth -type d -name ".mypy_cache" -exec rm -r "{}" + find "${@:-.}" -depth -type d -name ".pytest_cache" -exec rm -r "{}" + } # Grep among .py files alias pygrep='grep -nr --include="*.py"' # Share local directory as a HTTP server alias pyserver="python3 -m http.server"