import subprocess
import os
import dialog


class RDP():

    def __init__(self):
        self.d = dialog.Dialog(dialog="dialog")
        self.storage_path = os.path.expanduser("~/LidskjalvData")

    def 
(self, site, host):
        # """ """
        # FIXME
        # print("FIXME: rdp_menu")
        # sys.exit(1)
        while True:
            choices = []
            choices.append(["", " "])
            choices.append(["Q", "Quit"])
            sz = os.get_terminal_size()
            # width = sz.columns
            # height = sz.lines
            code, tag = self.d.menu(
                "Choose an action",
                height=sz.lines - 5,
                width=sz.columns - 8,
                menu_height=sz.lines - 15,
                choices=choices)
            if code == self.d.OK:
                if tag == "Q":
                    return None
                if tag == "F":
                    subprocess.Popen(["rdesktop", host])
                if tag == "90":
                    subprocess.Popen(["rdesktop", host])
                if tag == "75":
                    subprocess.Popen(["rdesktop", host])
                if tag == "50":
                    subprocess.Popen(["rdesktop", host])
                if tag == "25":
                    subprocess.Popen(["rdesktop", host])
        """
rdesktop
-g 1824x1026
-k da
-u USER: adusername
-d DOMAIN: myad
-p PASSWORD: password
-T 'NetworkAdmin'
-a 15
192.168.7.31
"""

show_rdp_menu