self-contained-runnable-python-package-template
self-contained-runnable-python-package-template copied to clipboard
Add assertion ensuring python3 is used
e.g. get this assertion error if you attempt to run using python2:
Error: This package is intended to be run in python3
(you seem to be running python2)
NOTE: Ironically, for this to work, this whole file needs to use python2 compatible syntax, otherwise the interpreter will exit with a syntax error even before it reaches this assertion. Specifically, this means we cannot use 'f-strings' in this file, so we'll need to rely on the older '.format()' mechanism.