fiddled around, haven't figured it out yet

This commit is contained in:
Joost Agterhoek 2024-08-21 22:13:44 +02:00
parent 2c2c772811
commit ece8f8ad7d

View File

@ -5,7 +5,7 @@
import tkinter as tk import tkinter as tk
from tkinter import ttk from tkinter import ttk
from generic import sanitize, type_hosts_listed from generic import sanitize, type_hosts_listed, type_hosts_organized
APP_TITLE = "Extract and look up hosts" APP_TITLE = "Extract and look up hosts"
ENTRY_LABEL = "Enter some IPs, domains, email addresses:" ENTRY_LABEL = "Enter some IPs, domains, email addresses:"
@ -35,7 +35,8 @@ class InputFrame(ttk.Frame):
def key_handler_function(self, event) -> None: def key_handler_function(self, event) -> None:
inputs = self.entry.get() inputs = self.entry.get()
sanitized = sanitize.strip_and_list(inputs) sanitized = sanitize.strip_and_list(inputs)
typed = type_hosts_listed.type_hosts(sanitized) typed = type_hosts_organized.type_hosts(sanitized)
var = tk.Variable()
class LookupFrame(ttk.Frame): class LookupFrame(ttk.Frame):
@ -47,9 +48,8 @@ class LookupFrame(ttk.Frame):
def __create_widgets(self) -> None: def __create_widgets(self) -> None:
ttk.Label(self, text=IP_LABEL).grid(column=0, row=3) ttk.Label(self, text=IP_LABEL).grid(column=0, row=3)
self.ip_listbox = tk.Listbox(self).grid( self.ip_listbox = tk.Listbox(self)
column=0, row=3, columnspan=2, sticky="nsew" self.ip_listbox.insert("end", "TEST")
)
for widget in self.winfo_children(): for widget in self.winfo_children():
widget.grid(padx=0, pady=5) widget.grid(padx=0, pady=5)
@ -61,6 +61,7 @@ class App(tk.Tk):
self.title(APP_TITLE) self.title(APP_TITLE)
self.geometry("400x150") self.geometry("400x150")
self.resizable(None, None) self.resizable(None, None)
self.shared_data = {}
# layout on the root window # layout on the root window
self.columnconfigure(0, weight=4) self.columnconfigure(0, weight=4)