title: How to take a Python function and create a simple Tkinter gui for it
body: <p>I have three functions 2 of which take a string and return a string. I have a third function that takes two strings and returns a string. I am trying to create a simple Tkinter GUI that would take in any parameters of the functions then based on the button press run my algorithm returning the result. Tkinter is giving me a hard time. I need four input fields for all possible parameters then run the correct function on press of button. Functions will look like:</p>
  
  <p>CalculateStrenghtofBrute(Word, Charset)
  CalculateDictionary(Word)
  CalculatePassPhrase(Phrase)</p>
  
  <p>All return a string created within the functions.</p>
  
  <p>Below is a Sample Function</p>
  
  <pre><code>def wordTime(Password):
  
      with open('Dics/dict.txt','r') as f:
      Words = f.read().splitlines()
  
      found = Words.index(Password)
      found += 1
      timeSec = found*.1
      if(timeSec&gt; 31536000):
          time = timeSec/31536000
          timeType = 'Years'
      elif(timeSec&gt;86400):
          time = timeSec/86400
          timeType = 'Days'
      elif(timeSec&gt;360):
          time = timeSec/360
          timeType = 'Hours'
      elif(timeSec&gt;60):
          time = timeSec/60
          timeType = 'Minutes'
      else:
          time = timeSec
          timeType ='Seconds'
  
  
  return ('Cracking',Password,'using dictionary attack will take', round(time, 2), timeType+'.')
  </code></pre>
  
  <p>Thanks</p>