implemented shell function with subprocess.Popen and revised flake8 command