# Path: auto_forensicate/hostinfo.py
# def Which(cmd):
#   """Searches for a binary in the current PATH environment variable.
# 
#   Args:
#     cmd(str): the binary to search for.
#   Returns:
#     str: the first found path to a binary with the same name, or None.
#   """
#   path_list = os.environ.get('PATH', os.defpath).split(os.pathsep)
#   for directory in path_list:
#     name = os.path.join(directory, cmd)
#     if os.path.isdir(name):
#       continue
#     if os.path.exists(name) and os.access(name, os.F_OK | os.X_OK):
#       return name
#   return None


import subprocess
from auto_forensicate.hostinfo import Which
# -*- coding: utf-8 -*-
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Interface to Zenity."""



def GetYesNo(text):
  """Ask user a Yes/No question.

  Args:
    text(str): The message to display.
  Returns:
    bool: the user's answer.
  """


# Path: auto_forensicate/hostinfo.py
# def Which(cmd):
#   """Searches for a binary in the current PATH environment variable.
# 
#   Args:
#     cmd(str): the binary to search for.
#   Returns:
#     str: the first found path to a binary with the same name, or None.
#   """
#   path_list = os.environ.get('PATH', os.defpath).split(os.pathsep)
#   for directory in path_list:
#     name = os.path.join(directory, cmd)
#     if os.path.isdir(name):
#       continue
#     if os.path.exists(name) and os.access(name, os.F_OK | os.X_OK):
#       return name
#   return None


# Path: auto_forensicate/ux/zenity.py
import subprocess
from auto_forensicate.hostinfo import Which

# -*- coding: utf-8 -*-
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Interface to Zenity."""



def GetYesNo(text):
  """Ask user a Yes/No question.

  Args:
    text(str): The message to display.
  Returns:
    bool: the user's answer.
  """


  zenity_binary = Which('zenity')