*fix: get python version properly

This commit is contained in:
Eray Özkural
2005-12-09 09:32:37 +00:00
parent 6897b4303b
commit 9d40a51a3c
+6 -1
View File
@@ -43,9 +43,14 @@ def curKERNEL():
versionString = file("/proc/version").readline()
return versionString.split()[2]
#FIXME: misleading name, what does this mean?
#we want the "pythonlibdir"
def curPYTHON():
''' returns currently used python's version'''
return os.path.basename(os.readlink("/usr/bin/python"))
# the method of reading symlink name was totally lame :) -- exa
import sys
(a, b, c, x, y) = sys.version_info
return 'python%s.%s' % (a, b)
def ENV(environ):
'''returns any given environ variable'''