bpython+ is a thin wrapper around the bpython interpreter, which allows the user to specify whether it should be executed with version 2 or 3 of the Python interpreter; the implementation is practically identical to that of pylint+.
You must have:
python2
in your$PATH
python3
in your$PATH
bpython
installed (viapip
, and not from your package manager) for Python 2pylint
installed (viapip3
, and not from your package manager) for Python 3
Place bpython+
somewhere in your $PATH
, and make sure that it has executable permissions. Then:
bpython+ 2|3 [BPYTHON_ARGS]
For instance:
$ bpython+ 2
>>> import sys
>>> sys.version_info
sys.version_info(major=2, minor=7, micro=6, releaselevel='final', serial=0)
$ bpython+ 3
>>> import sys
>>> sys.version_info
sys.version_info(major=3, minor=4, micro=0, releaselevel='final', serial=0)
On Linux shell it may be simpler. For example, on bash follow the steps below for your user:
alias bpython2='python2 -m bpython'
alias bpython3='python3 -m bpython'
In my case, i set the 'bpy'-named aliases
$ . .bashrc
That's all:
