Add python_version function to functions-common

This makes it possible to list virtual site-package directories
without statically stating the python version, which is a bit ugly.

Change-Id: I3e7ac39eb43cdc4f656e0c90f3bfb23545722aef
diff --git a/functions-common b/functions-common
index 4d07c03..d28ef85 100644
--- a/functions-common
+++ b/functions-common
@@ -1897,6 +1897,12 @@
     echo $subnet
 }
 
+# Return the current python as "python<major>.<minor>"
+function python_version {
+    local python_version=$(python -c 'import sys; print("%s.%s" % sys.version_info[0:2])')
+    echo "python${python_version}"
+}
+
 # Service wrapper to restart services
 # restart_service service-name
 function restart_service {