Update Python code and tox