If you have time, please visit the repo and read the files. I'll post some relevant snippets below, but if you can quickly skim over the whole thing, that would be great.
I'm new to Python so I'm sure there are some things in the code below that may not be best code practice. If you spot anything off, please let me know.
I don't see many people writing Tkinter .grid() calls in this fashion so I'm thinking there may be some more practical way to do this. Also, the outcome looks like something from 1995, so I also wish I could give it a modern look.
enc_userkeys_label.grid(row=0,column=0) enc_userkeys.grid(row=0,column=1) enc_userkeys_clear.grid(row=0,column=2) enc_sourcetext_label.grid(row=1,column=0) enc_sourcetext.grid(row=1,column=1) enc_sourcetext_clear.grid(row=1,column=2) enc_button.grid(row=2,column=1)
What follows below feels like C code, I believe there must be a shorter and faster way to write this function in Python.
def getsum(addrlist): alladdr =  sumlists =  for addr in addrlist: final =  temp =  switch = True for url in addr: if switch: temp.append(url) switch = False elif not switch: temp.append(url[-1]) switch = True final.append(tuple(temp)) temp =  alladdr.append(tuple(final)) for addr in alladdr: temp =  for pair in addr: for bitpair in BITARRAY: if pair == bitpair: temp.append(BITARRAY.index(bitpair)) continue sumlists.append(tuple(temp)) return sumlists
addrlist parameter is a list of tuples, like this:
addrlist = [ ('wDzN2SQ8dCs', 'NLQf-Q8zlG0'), ('EhFPMTWSsso', 'wf1laG5Jp34') ]
BITARRAY is a global variable that is also a list of tuples.
for i in '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz': for j in '048AEIMQUYcgkosw': BITARRAY.append((i,j))