python-rst2ansi icon indicating copy to clipboard operation
python-rst2ansi copied to clipboard

Executable script calls for python2

Open NJDFan opened this issue 8 years ago • 2 comments

The main executable bin/rst2ansi starts with #!/usr/bin/python which aliases python2 (PEP 394). Should be #!/usr/bin/python3 or even better #!/usr/bin/env python3

NJDFan avatar Jun 18 '17 16:06 NJDFan

The library was ported to python 2.7 in #2, so I guess we should still be using #!/usr/bin/env python like we're doing right now. Does it still work on python 2? If not, it seems sensible to update the shebang.

Snaipe avatar Jun 18 '17 21:06 Snaipe

Nearly so; it does with a from __future__ import print_function. I put in a pull request that updates the setup.py to work correctly under 2/3. It does come at a cost of requiring setuptools rather than allowing for a clean fallback to distutils, but I feel like that's pretty much where the world is right now.

NJDFan avatar Jun 18 '17 23:06 NJDFan