Popular recipes tagged "computation"http://code.activestate.com/recipes/tags/computation/2017-02-06T18:30:18-08:00ActiveState Code RecipesLong processing computation in Tkinter or long-running task (Python) 2017-02-06T18:30:18-08:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580754-long-processing-computation-in-tkinter-or-long-run/ <p style="color: grey"> Python recipe 580754 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/computation/">computation</a>, <a href="/recipes/tags/intensive/">intensive</a>, <a href="/recipes/tags/long/">long</a>, <a href="/recipes/tags/task/">task</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 12. </p> <p>I provide in this module the function "tk_call_async": It executes a function asynchronously.</p> <pre class="prettyprint"><code>tk_call_async(window, computation, args=(), kwargs={}, callback=None, polling=100, method=MULTIPROCESSING) </code></pre> <p>"tk_call_async" executes the function "computation" asynchronously with the provided "args" and "kwargs" without blocking the tkinter event loop.</p> <p>If "callback" is provided, it will be called with the result when the computation is finished.</p> <p>If an exception happens doing the computation, the errback function is called with the exception if this is provided.</p> <p>"Polling" will be the frequency to poll to check for results.</p> <p>There is two methods to execute the task: using multiprocessing or using threads.</p> Yahoo Stock Information (Python) 2012-08-25T17:16:47-07:00Alexander James Wallarhttp://code.activestate.com/recipes/users/4179768/http://code.activestate.com/recipes/577989-yahoo-stock-information/ <p style="color: grey"> Python recipe 577989 by <a href="/recipes/users/4179768/">Alexander James Wallar</a> (<a href="/recipes/tags/computation/">computation</a>, <a href="/recipes/tags/corey_goldberg/">corey_goldberg</a>, <a href="/recipes/tags/finance/">finance</a>, <a href="/recipes/tags/information/">information</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/realtime/">realtime</a>, <a href="/recipes/tags/stock/">stock</a>, <a href="/recipes/tags/yahoo/">yahoo</a>). Revision 3. </p> <p>This recipe is solely due to the programming of Corey Goldberg (<a href="mailto:corey@goldb.org">corey@goldb.org</a>). The only thing I did to it was make it into a class. I thought that by uploading it here that more people would come across it and more people could use it. It is really good. It gives you stock information.</p>