def _python_installed(ret, python, user=None):
 default = __salt__['pyenv.default'](runas=user)
 for version in __salt__['pyenv.versions'](user):
  if (version == python):
   ret['result'] = True
   ret['comment'] = 'Requested python exists.'
   ret['default'] = (default == python)
   break
 return ret

def _python_installed ( ret , python , user = None ) : default = __salt__ [ 'pyenv.default' ] ( runas = user ) for version in __salt__ [ 'pyenv.versions' ] ( user ) : if ( version == python ) : ret [ 'result' ] = True ret [ 'comment' ] = 'Requested python exists.' ret [ 'default' ] = ( default == python ) break return ret
check to see if given python is installed .