1 | |
---|
2 | |
---|
3 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
4 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
5 | |
---|
6 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
7 | <head> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
9 | |
---|
10 | <title>load_thread — guiframe v0.1.0 documentation</title> |
---|
11 | <link rel="stylesheet" href="../_static/default.css" type="text/css" /> |
---|
12 | <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> |
---|
13 | <script type="text/javascript"> |
---|
14 | var DOCUMENTATION_OPTIONS = { |
---|
15 | URL_ROOT: '../', |
---|
16 | VERSION: '0.1.0', |
---|
17 | COLLAPSE_INDEX: false, |
---|
18 | FILE_SUFFIX: '.html', |
---|
19 | HAS_SOURCE: true |
---|
20 | }; |
---|
21 | </script> |
---|
22 | <script type="text/javascript" src="../_static/jquery.js"></script> |
---|
23 | <script type="text/javascript" src="../_static/underscore.js"></script> |
---|
24 | <script type="text/javascript" src="../_static/doctools.js"></script> |
---|
25 | <link rel="top" title="guiframe v0.1.0 documentation" href="../index.html" /> |
---|
26 | <link rel="up" title="Reference" href="index.html" /> |
---|
27 | <link rel="next" title="statusbar" href="statusbar.html" /> |
---|
28 | <link rel="prev" title="gui_manager" href="gui_manager.html" /> |
---|
29 | </head> |
---|
30 | <body> |
---|
31 | <div class="related"> |
---|
32 | <h3>Navigation</h3> |
---|
33 | <ul> |
---|
34 | <li class="right" style="margin-right: 10px"> |
---|
35 | <a href="../genindex.html" title="General Index" |
---|
36 | accesskey="I">index</a></li> |
---|
37 | <li class="right" > |
---|
38 | <a href="../py-modindex.html" title="Python Module Index" |
---|
39 | >modules</a> |</li> |
---|
40 | <li class="right" > |
---|
41 | <a href="statusbar.html" title="statusbar" |
---|
42 | accesskey="N">next</a> |</li> |
---|
43 | <li class="right" > |
---|
44 | <a href="gui_manager.html" title="gui_manager" |
---|
45 | accesskey="P">previous</a> |</li> |
---|
46 | <li><a href="../index.html">guiframe v0.1.0 documentation</a> »</li> |
---|
47 | <li><a href="index.html" accesskey="U">Reference</a> »</li> |
---|
48 | </ul> |
---|
49 | </div> |
---|
50 | |
---|
51 | <div class="document"> |
---|
52 | <div class="documentwrapper"> |
---|
53 | <div class="bodywrapper"> |
---|
54 | <div class="body"> |
---|
55 | |
---|
56 | <div class="section" id="load-thread"> |
---|
57 | <h1>load_thread<a class="headerlink" href="#load-thread" title="Permalink to this headline">¶</a></h1> |
---|
58 | <div class="section" id="module-sans.guiframe.load_thread"> |
---|
59 | <span id="sans-guiframe-load-thread"></span><h2><a class="reference internal" href="#module-sans.guiframe.load_thread"><tt class="xref py py-mod docutils literal"><span class="pre">sans.guiframe.load_thread</span></tt></a><a class="headerlink" href="#module-sans.guiframe.load_thread" title="Permalink to this headline">¶</a></h2> |
---|
60 | <dl class="class"> |
---|
61 | <dt id="sans.guiframe.load_thread.DataReader"> |
---|
62 | <em class="property">class </em><tt class="descclassname">sans.guiframe.load_thread.</tt><tt class="descname">DataReader</tt><big>(</big><em>path</em>, <em>err_fct</em>, <em>msg_fct</em>, <em>parent=None</em>, <em>completefn=None</em>, <em>updatefn=None</em>, <em>yieldtime=0.01</em>, <em>worktime=0.01</em><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader" title="Permalink to this definition">¶</a></dt> |
---|
63 | <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">data_util.calcthread.CalcThread</span></tt></p> |
---|
64 | <p>Load a data given a filename</p> |
---|
65 | <dl class="method"> |
---|
66 | <dt id="sans.guiframe.load_thread.DataReader.complete"> |
---|
67 | <tt class="descname">complete</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader.complete" title="Permalink to this definition">¶</a></dt> |
---|
68 | <dd>Update the GUI with the completed results from a work unit.</dd></dl> |
---|
69 | |
---|
70 | <dl class="method"> |
---|
71 | <dt id="sans.guiframe.load_thread.DataReader.compute"> |
---|
72 | <tt class="descname">compute</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader.compute" title="Permalink to this definition">¶</a></dt> |
---|
73 | <dd>read some data</dd></dl> |
---|
74 | |
---|
75 | <dl class="method"> |
---|
76 | <dt id="sans.guiframe.load_thread.DataReader.interrupt"> |
---|
77 | <tt class="descname">interrupt</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader.interrupt" title="Permalink to this definition">¶</a></dt> |
---|
78 | <dd>Stop the current work item. To clear the work queue as |
---|
79 | well call the stop() method.</dd></dl> |
---|
80 | |
---|
81 | <dl class="method"> |
---|
82 | <dt id="sans.guiframe.load_thread.DataReader.isquit"> |
---|
83 | <tt class="descname">isquit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader.isquit" title="Permalink to this definition">¶</a></dt> |
---|
84 | <dd><table class="docutils field-list" frame="void" rules="none"> |
---|
85 | <col class="field-name" /> |
---|
86 | <col class="field-body" /> |
---|
87 | <tbody valign="top"> |
---|
88 | <tr class="field"><th class="field-name" colspan="2">Raises KeyboardInterrupt:</th></tr> |
---|
89 | <tr><td> </td><td class="field-body">when the thread is interrupted</td> |
---|
90 | </tr> |
---|
91 | </tbody> |
---|
92 | </table> |
---|
93 | </dd></dl> |
---|
94 | |
---|
95 | <dl class="method"> |
---|
96 | <dt id="sans.guiframe.load_thread.DataReader.isrunning"> |
---|
97 | <tt class="descname">isrunning</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader.isrunning" title="Permalink to this definition">¶</a></dt> |
---|
98 | <dd></dd></dl> |
---|
99 | |
---|
100 | <dl class="method"> |
---|
101 | <dt id="sans.guiframe.load_thread.DataReader.queue"> |
---|
102 | <tt class="descname">queue</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader.queue" title="Permalink to this definition">¶</a></dt> |
---|
103 | <dd>Add a work unit to the end of the queue. See the compute() |
---|
104 | method for details of the arguments to the work unit.</dd></dl> |
---|
105 | |
---|
106 | <dl class="method"> |
---|
107 | <dt id="sans.guiframe.load_thread.DataReader.ready"> |
---|
108 | <tt class="descname">ready</tt><big>(</big><em>delay=0.0</em><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader.ready" title="Permalink to this definition">¶</a></dt> |
---|
109 | <dd>Ready for another update after delay=t seconds. Call |
---|
110 | this for threads which can show intermediate results from |
---|
111 | long calculations.</dd></dl> |
---|
112 | |
---|
113 | <dl class="method"> |
---|
114 | <dt id="sans.guiframe.load_thread.DataReader.requeue"> |
---|
115 | <tt class="descname">requeue</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader.requeue" title="Permalink to this definition">¶</a></dt> |
---|
116 | <dd>Replace the work unit on the end of the queue. See the compute() |
---|
117 | method for details of the arguments to the work unit.</dd></dl> |
---|
118 | |
---|
119 | <dl class="method"> |
---|
120 | <dt id="sans.guiframe.load_thread.DataReader.reset"> |
---|
121 | <tt class="descname">reset</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader.reset" title="Permalink to this definition">¶</a></dt> |
---|
122 | <dd>Clear the queue and start a new work unit. See the compute() |
---|
123 | method for details of the arguments to the work unit.</dd></dl> |
---|
124 | |
---|
125 | <dl class="method"> |
---|
126 | <dt id="sans.guiframe.load_thread.DataReader.stop"> |
---|
127 | <tt class="descname">stop</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader.stop" title="Permalink to this definition">¶</a></dt> |
---|
128 | <dd>Clear the queue and stop the thread. New items may be |
---|
129 | queued after stop. To stop just the current work item, and |
---|
130 | continue the rest of the queue call the interrupt method</dd></dl> |
---|
131 | |
---|
132 | <dl class="method"> |
---|
133 | <dt id="sans.guiframe.load_thread.DataReader.update"> |
---|
134 | <tt class="descname">update</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.guiframe.load_thread.DataReader.update" title="Permalink to this definition">¶</a></dt> |
---|
135 | <dd>Update GUI with the lastest results from the current work unit.</dd></dl> |
---|
136 | |
---|
137 | </dd></dl> |
---|
138 | |
---|
139 | </div> |
---|
140 | </div> |
---|
141 | |
---|
142 | |
---|
143 | </div> |
---|
144 | </div> |
---|
145 | </div> |
---|
146 | <div class="sphinxsidebar"> |
---|
147 | <div class="sphinxsidebarwrapper"> |
---|
148 | <h3><a href="../index.html">Table Of Contents</a></h3> |
---|
149 | <ul> |
---|
150 | <li><a class="reference internal" href="#">load_thread</a><ul> |
---|
151 | <li><a class="reference internal" href="#module-sans.guiframe.load_thread"><tt class="docutils literal"><span class="pre">sans.guiframe.load_thread</span></tt></a></li> |
---|
152 | </ul> |
---|
153 | </li> |
---|
154 | </ul> |
---|
155 | |
---|
156 | <h4>Previous topic</h4> |
---|
157 | <p class="topless"><a href="gui_manager.html" |
---|
158 | title="previous chapter">gui_manager</a></p> |
---|
159 | <h4>Next topic</h4> |
---|
160 | <p class="topless"><a href="statusbar.html" |
---|
161 | title="next chapter">statusbar</a></p> |
---|
162 | <h3>This Page</h3> |
---|
163 | <ul class="this-page-menu"> |
---|
164 | <li><a href="../_sources/api/load_thread.txt" |
---|
165 | rel="nofollow">Show Source</a></li> |
---|
166 | </ul> |
---|
167 | <div id="searchbox" style="display: none"> |
---|
168 | <h3>Quick search</h3> |
---|
169 | <form class="search" action="../search.html" method="get"> |
---|
170 | <input type="text" name="q" size="18" /> |
---|
171 | <input type="submit" value="Go" /> |
---|
172 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
173 | <input type="hidden" name="area" value="default" /> |
---|
174 | </form> |
---|
175 | <p class="searchtip" style="font-size: 90%"> |
---|
176 | Enter search terms or a module, class or function name. |
---|
177 | </p> |
---|
178 | </div> |
---|
179 | <script type="text/javascript">$('#searchbox').show(0);</script> |
---|
180 | </div> |
---|
181 | </div> |
---|
182 | <div class="clearer"></div> |
---|
183 | </div> |
---|
184 | <div class="related"> |
---|
185 | <h3>Navigation</h3> |
---|
186 | <ul> |
---|
187 | <li class="right" style="margin-right: 10px"> |
---|
188 | <a href="../genindex.html" title="General Index" |
---|
189 | >index</a></li> |
---|
190 | <li class="right" > |
---|
191 | <a href="../py-modindex.html" title="Python Module Index" |
---|
192 | >modules</a> |</li> |
---|
193 | <li class="right" > |
---|
194 | <a href="statusbar.html" title="statusbar" |
---|
195 | >next</a> |</li> |
---|
196 | <li class="right" > |
---|
197 | <a href="gui_manager.html" title="gui_manager" |
---|
198 | >previous</a> |</li> |
---|
199 | <li><a href="../index.html">guiframe v0.1.0 documentation</a> »</li> |
---|
200 | <li><a href="index.html" >Reference</a> »</li> |
---|
201 | </ul> |
---|
202 | </div> |
---|
203 | <div class="footer"> |
---|
204 | © Copyright 2010, sans group. |
---|
205 | Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0b1. |
---|
206 | </div> |
---|
207 | </body> |
---|
208 | </html> |
---|