title: Tkinter update progressbar from imported code
body: <p>I am creating a gui application using Tkinter, which imports other pieces of code stored in external .py files which contain time consuming functions. What I want to do is have a progressbar on my gui window which gets updated according to some function running in my imported script.</p>
  
  <p>Gui script example:</p>
  
  <pre><code>#gui script
  import tkinter
  from tkinter import ttk
  from somefile import somefunc
  
  progcomp = ttk.Progressbar(root, orient='horizontal', length=200, mode = 'determinate', maximum=100)
  somefunc()
  </code></pre>
  
  <p>External function example:</p>
  
  <pre><code>#somefile.py
  def somefunc():
      for i in range(1000):
          #dosomething
          #update progressbar of gui script
  </code></pre>
  
  <p>My actual code is too long to show in a question like this, so I chose to represent it as simply as possible. My question is, is this possible or will I have to change the infrastructure to accomplish? </p>