def __init__(self, wname=None):
    wname = wname if wname is not None else user32.GetDesktopWindow()

    try:
      wname.lower()
      hwnd = self.get_window_hwnd(wname)
      if hwnd:
        self.hwnd = hwnd
      else:
        raise Exception("Invalid window name/hwnd")

    except __HOLE__:
      self.hwnd = wname
dataset/ETHPy150Open chriskiehl/pyrobot/pyrobot.py/Robot.__init__