Support Python 2.6+ & 3.0+

* Seamless support of both version with same code.
* Added test version for py3 on RVM = 2.1.0.
This commit is contained in:
Jeremy Pallats/starcraft.man
2015-04-09 10:45:41 -04:00
parent d738da2ddb
commit ef4549d2d1
4 changed files with 39 additions and 18 deletions

View File

@@ -45,6 +45,8 @@ Execute (Print Interpreter Version):
silent ruby puts 'Ruby: ' + RUBY_VERSION
elseif has('python')
silent python import sys; svi = sys.version_info; print 'Python: {}.{}.{}'.format(svi[0], svi[1], svi[2])
elseif has('python3')
silent python3 import sys; svi = sys.version_info; print('Python: {}.{}.{}'.format(svi[0], svi[1], svi[2]))
endif
redir END
Log substitute(out, '\n', '', 'g')