Ah. Okay, you can use htaccess to protect a folder on your server. The popup comes from the browser, but I think most do not have an option to remember the username. There is no way to control this unfortunately.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: