python代码中判断版本

在python代码中判断python版本: 

if sys.version_info < (3, 0):
  lib.make_flows.argtypes = [c_char_p, c_char_p, c_int, c_int, c_int]
  lib.make_flows(avi, newpath, 0, 0, 10)
else:
   in_path = bytes(avi, 'utf8')
   out_path = bytes(newpath, 'utf8')
   lib.make_flows(in_path, out_path, 0, 0, 10)

 

posted @ 2018-07-07 00:36  木易修  阅读(8666)  评论(0编辑  收藏  举报