In the spirit of trying and testing new ideas I have created a gui slider bar with the min:max decimal representations of puzzle #66. You can slide the bar and it will print to the terminal. This idea doesn't really work and I imagine it's because of memory and cpu limitations.
UPDATE:
This code is a working example. It still has many limitations.
problem 1: every number printed to the terminal is a multiple of 2.
problem 2: the hexadecimal output is limited to 14 characters, I always have 000 at the end of the string.
slider_code.py
import tkinter as tk
from bitcoin import *
def update_bitcoin_key(value):
decimal_value = int(value)
hex_private_key = hex(int(decimal_value))[2:]
private_key = '0' * 47 + hex_private_key + "21"
public_key = privtopub(private_key)
address = pubtoaddr(public_key)
print(hex_private_key)
#print(public_key)
print(address)
root = tk . Tk () #remove spaces
value_slider = tk.Scale(root, from_=0x20000000000000000, to=0x3ffffffffffffffff, orient=tk.HORIZONTAL, length=400, command=update_bitcoin_key)
value_slider.pack(pady=20)
root.mainloop()
The default behavior of Tkinter's Scale widget is to increment in steps based on the range of values it's handling. With such a large range a slider might not be the best UI element.