def get_using_python_pkgname():
 path = get_using_python_path()
 if path.startswith(PATH_PYTHONS):
  path = path.replace(PATH_PYTHONS, '').strip(os.sep)
  (pkgname, rest) = path.split(os.sep, 1)
  return pkgname
 if path.startswith(PATH_VENVS):
  path = path.replace(PATH_VENVS, '').strip(os.sep)
  (pkgname, rest) = path.split(os.sep, 1)
  return pkgname
 return None

def get_using_python_pkgname ( ) : path = get_using_python_path ( ) if path . startswith ( PATH_PYTHONS ) : path = path . replace ( PATH_PYTHONS , '' ) . strip ( os . sep ) ( pkgname , rest ) = path . split ( os . sep , 1 ) return pkgname if path . startswith ( PATH_VENVS ) : path = path . replace ( PATH_VENVS , '' ) . strip ( os . sep ) ( pkgname , rest ) = path . split ( os . sep , 1 ) return pkgname return None
return: python-<version> or none .