From 8d0bb15b6382b10ca34db25d24e9404a7e0a58c8 Mon Sep 17 00:00:00 2001 From: Joost Agterhoek Date: Fri, 9 Aug 2024 10:17:47 +0200 Subject: [PATCH] removed todos to readme --- tkinter-enter.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tkinter-enter.py b/tkinter-enter.py index 2f2e4e4..022f1bb 100644 --- a/tkinter-enter.py +++ b/tkinter-enter.py @@ -3,7 +3,7 @@ # importing tkinter import tkinter as tk -from generic import sanitize, type_hosts_listed, type_hosts_organized, ip_lookup, domain_lookup, spf_dmarc +from ..generic import sanitize, type_hosts_listed, type_hosts_organized, ip_lookup, domain_lookup, spf_dmarc # function to run on pressing # 'ENTER' key from keyboard. @@ -59,10 +59,8 @@ root.columnconfigure(2, weight=1) root.columnconfigure(3, weight=1) #Listing stuff -# Gotta try out: https://www.pythontutorial.net/tkinter/tkinter-listbox/ # creating widgets -# try to use grid instead of pack: https://www.geeksforgeeks.org/python-grid-method-in-tkinter/ entry = tk.Entry(root, text="Put in IP addresses, URLs, domains, email addresses") textbox = tk.Text(root, height=8) # textbox.insert('1.0', test) @@ -91,10 +89,7 @@ email_listbox.grid(column=2, row=5, columnspan=2, sticky='nsew') # textbox.grid(column=1, row=3) #Trying out buttons -# Try to create a copy-paste button: https://www.delftstack.com/howto/python/python-copy-to-clipboard/#copy-text-to-clipboard-in-python-using-the-tkinter-module test_button = tk.Button(root, text="comma-separate and add quotes", command=test_button_function) -# test_button.grid(column=2, row=5, columnspan=2) - # Binding ENTER key to function entry.bind("", key_handler_function) @@ -102,7 +97,3 @@ entry.bind("", key_handler_function) # run the application root.mainloop() -# Instead of a label showing the output, use a text box: https://pythonguides.com/python-tkinter-text-box/ -> DONE -# Implement a copy paste button: https://stackoverflow.com/a/71357987 -# Try out ways to sanitize input, f.e. extract email addresses like in Cyberchef: https://github.com/gchq/CyberChef/blob/master/src/core/operations/ExtractEmailAddresses.mjs -# Another simpler way would be to first account for special characters, which are not allowed in email addresses: https://stackoverflow.com/questions/2049502/what-characters-are-allowed-in-an-email-address