title: Python return value from scheduled event
body: <p>I would like to get the value returned from a function called by a scheduled event. Below is a simple example of what I would like to do.</p>
  
  <pre><code>import time
  import sched
  
  schedule = sched.scheduler(time.time, time.sleep)
  
  def ret_this():
      return "This."
  
  def schedthis():
      schedule.enter(2,1,ret_this, ())
      schedule.run()
      ## &lt;- print returned value here
  
  if __name__ == "__main__":
      schedthis()
  </code></pre>
  
  <p>I have tried many things like:</p>
  
  <pre><code>     schedule.enter(2,1,print ret_this, ())
  </code></pre>
  
  <p>or even:</p>
  
  <pre><code>    schedule.enter(2,1,ret = ret_this, ())
      schedule.run()
      print ret
  </code></pre>
  
  <p><br>Maybe some background will be necessary.
  <br><br>I would like to create a server that will listen for incoming connections(This is done.). When a connection is established a new thread will spawn and the socket will be parsed to that thread. On that thread the values sent to the server will be read and the server will judge what the client is trying to schedule. Once the server knows what the client wants it will schedule it.
  <br><br>If the user wants to view the information after the scheduled event has completed (Where this answer comes in) then it will wait until the event has ended and send the returned values to the client.
  <br><br>If not the the event will be scheduled and the client will receive "Done, farewell." and the connection will close. 
  <br><br>I call the programming gods, please could you help me.</p>