I am completely new to python and I have been working with a script to generate a token(it also uses imports of other scripts), but now I want to use it on a GUI instead of over cmd always. Is this possible? I have tried using an example GUI and adding the elements to it, but I can't seem to figure out the output portion.
the main.py:
from encode_token import Encoder, Shared
from decode_token import Decoder
import codecs
dkey = (input("enter hex:\n"))
start_code = int(input("enter Starting code:\n"))
device_count = int(input("enter last count:\n"))
days_to_activate = int(input("enter days to activate:\n"))
if __name__ == '__main__':
print('Generating code to: '+device_key_hex+' and starting code '+str(device_starting_code)+'. ')
new_count, token = Encoder.generate_standard_token(
starting_code=start_code,
key=codecs.decode(dkey, 'hex'),
value=days_to_activate,
count=device_count,
restricted_digit_set=False,
mode=Shared.TOKEN_TYPE_ADD_TIME
)
print(token)
value, count, type = Decoder.get_activation_value_count_and_type_from_token(
starting_code=start_code,
key=codecs.decode(dkey, 'hex'),
token=token,
last_count=device_count
)
print(value, count, type)