# Path: dragonpy/constants.py
# DRAGON32 = "Dragon32"
# DRAGON64 = "Dragon64"
# COCO2B = "CoCo2b"
# SBC09 = "sbc09"
# SIMPLE6809 = "Simple6809"
# MULTICOMP6809 = "Multicomp6809"
# VECTREX = "Vectrex"
# 
# Path: dragonpy/core/configs.py
# class MachineDict(dict):
# class DummyMemInfo:
# class AddressAreas(dict):
# class BaseConfig:
#     DEFAULT = None
#     BURST_COUNT = 10000
#     DEFAULT_ROMS = {}
#     def register(self, name, cls, default=False):
#     def get_shortest(self, *args):
#     def __call__(self, *args):
#     def __init__(self, areas):
#     def add_area(self, start_addr, end_addr, txt):
#     def __init__(self, cfg_dict):
#     def _get_initial_Memory(self, size):
#     def get_initial_RAM(self):
#     def get_initial_ROM(self):
#     def print_debug_info(self):
# 
# Path: dragonpy/utils/humanize.py
# def get_python_info():
#     implementation = platform.python_implementation()
#     if implementation == "CPython":
#         return f"{implementation} v{platform.python_version()} [{platform.python_compiler()}]"
#         # e.g.: CPython v2.7.6 [GCC 4.8.2]
#     elif implementation == "PyPy":
#         ver_info = sys.version.split("(", 1)[0]
#         ver_info += sys.version.split("\n")[-1]
#         return f"Python {ver_info}"
#         # e.g.: Python 2.7.6 [PyPy 2.3.1 with GCC 4.8.2]
#     else:
#         return "{} {}".format(
#             sys.executable,
#             sys.version.replace("\n", " ")
#         )


import atexit
import logging
import tkinter as tk
import dragonpy
from dev_shell.utils.colorful import bright_blue
from dev_shell.utils.subprocess_utils import verbose_check_call
from MC6809.cli import DEFAULT_LOOPS, DEFAULT_MULTIPLY
from MC6809.core.bechmark import run_benchmark
from dragonpy import constants
from dragonpy.core.configs import machine_dict
from dragonpy.utils.humanize import get_python_info
    """
    base on code from idlelib.MultiStatusBar.MultiStatusBar
    """

    def __init__(self, master, **kwargs):
        tk.Frame.__init__(self, master)
        self.grid(**kwargs)
        self.columnconfigure(0, weight=1)
        self.rowconfigure(0, weight=1)
        self.labels = {}

    def set_label(self, name, text='', **kwargs):
        defaults = {
            "ipadx": 2,  # add internal padding in x direction
            "ipady": 2,  # add internal padding in y direction
            "padx": 1,  # add padding in x direction
            "pady": 0,  # add padding in y direction
            "sticky": tk.NSEW,  # stick to the cell boundary
        }
        defaults.update(kwargs)
        if name not in self.labels:
            label = tk.Label(self, bd=1, relief=tk.SUNKEN, anchor=tk.W)
            label.grid(column=len(self.labels), row=0, **defaults)
            self.labels[name] = label
        else:
            label = self.labels[name]
        label.config(text=text)


class StarterGUI(tk.Tk):

# Path: dragonpy/constants.py
# DRAGON32 = "Dragon32"
# DRAGON64 = "Dragon64"
# COCO2B = "CoCo2b"
# SBC09 = "sbc09"
# SIMPLE6809 = "Simple6809"
# MULTICOMP6809 = "Multicomp6809"
# VECTREX = "Vectrex"
# 
# Path: dragonpy/core/configs.py
# class MachineDict(dict):
# class DummyMemInfo:
# class AddressAreas(dict):
# class BaseConfig:
#     DEFAULT = None
#     BURST_COUNT = 10000
#     DEFAULT_ROMS = {}
#     def register(self, name, cls, default=False):
#     def get_shortest(self, *args):
#     def __call__(self, *args):
#     def __init__(self, areas):
#     def add_area(self, start_addr, end_addr, txt):
#     def __init__(self, cfg_dict):
#     def _get_initial_Memory(self, size):
#     def get_initial_RAM(self):
#     def get_initial_ROM(self):
#     def print_debug_info(self):
# 
# Path: dragonpy/utils/humanize.py
# def get_python_info():
#     implementation = platform.python_implementation()
#     if implementation == "CPython":
#         return f"{implementation} v{platform.python_version()} [{platform.python_compiler()}]"
#         # e.g.: CPython v2.7.6 [GCC 4.8.2]
#     elif implementation == "PyPy":
#         ver_info = sys.version.split("(", 1)[0]
#         ver_info += sys.version.split("\n")[-1]
#         return f"Python {ver_info}"
#         # e.g.: Python 2.7.6 [PyPy 2.3.1 with GCC 4.8.2]
#     else:
#         return "{} {}".format(
#             sys.executable,
#             sys.version.replace("\n", " ")
#         )


# Path: dragonpy/core/gui_starter.py
import atexit
import logging
import tkinter as tk
import dragonpy
from dev_shell.utils.colorful import bright_blue
from dev_shell.utils.subprocess_utils import verbose_check_call
from MC6809.cli import DEFAULT_LOOPS, DEFAULT_MULTIPLY
from MC6809.core.bechmark import run_benchmark
from dragonpy import constants
from dragonpy.core.configs import machine_dict
from dragonpy.utils.humanize import get_python_info

    """
    base on code from idlelib.MultiStatusBar.MultiStatusBar
    """

    def __init__(self, master, **kwargs):
        tk.Frame.__init__(self, master)
        self.grid(**kwargs)
        self.columnconfigure(0, weight=1)
        self.rowconfigure(0, weight=1)
        self.labels = {}

    def set_label(self, name, text='', **kwargs):
        defaults = {
            "ipadx": 2,  # add internal padding in x direction
            "ipady": 2,  # add internal padding in y direction
            "padx": 1,  # add padding in x direction
            "pady": 0,  # add padding in y direction
            "sticky": tk.NSEW,  # stick to the cell boundary
        }
        defaults.update(kwargs)
        if name not in self.labels:
            label = tk.Label(self, bd=1, relief=tk.SUNKEN, anchor=tk.W)
            label.grid(column=len(self.labels), row=0, **defaults)
            self.labels[name] = label
        else:
            label = self.labels[name]
        label.config(text=text)


class StarterGUI(tk.Tk):

    def __init__(self, machine_dict):