Is there a standard way to make sure a python script will be interpreted by python3 and not python2?

丶灬走出姿态 提交于 2019-12-03 16:38:11
import sys
try:
   assert sys.version_info[0] == 3
except:
   print "ERROR NOT PYTHON 3!"
   sys.exit()
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!