"Ben S. via Python-list" <python-list at python.org> writes: > Can I somehow check from inside a Python script if the executing Python engine is major version v2 or v3? import sys sys.version_info[0] (If you just need to print() consistently, you should follow Terry's advice)