Using 'python' in commands is confusing

Issue #305 on hold
Barry Warsaw created an issue

Another feedback from my fellow sprinters new to tox.

Very often you'll see something like this in your tox.ini:

basepython = python3
commands =
    python -m coverage run {[coverage]rc} -m nose -v
    python -m coverage combine {[coverage]rc}
    python -m coverage html {[coverage]rc}
    python -m coverage report -m {[coverage]rc}

The details aren't important other than what we're doing here is invoking some python interpreter to run some commands. In the commands lines we see the string "python" and while tox does the right thing by substituting basepython for that, it's confusing when people see it because they think that it's literally using /usr/bin/python (i.e. Python 2) for those commands.

I thought maybe we could use {basepython} -m blah but that doesn't work. Any thoughts on a way to make it obvious the "python" in commands is being substituted instead of actually using Python 2?

Comments (2)

  1. Log in to comment