<div dir="ltr">Baz,<div><br></div><div>Perfect -- just what I needed. Thanks!</div><div><br></div><div>Bryan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 26, 2014 at 5:04 PM, Baz Walter <span dir="ltr"><<a href="mailto:bazwal@ftml.net" target="_blank">bazwal@ftml.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 26/08/14 22:25, Bryan A. Jones wrote:<br>
> All,<br>
><br>
> A simple question -- I'd like to define a signal which expects a function<br>
> (or any callable) as an argument to the signal. I'm accustomed to defining<br>
> signals with other parameters, such as<br>
><br>
> signalName = pyqtSignal(int, str, list, dict)<br>
><br>
> What's the type for a function?<br>
><br>
> signalName = pyqtSignal(def?) # nope; not 'function' either.<br>
<br>
</div>You could use the types module from the stdlib:<br>
<br>
signalName = pyqtSignal(types.FunctionType)<br>
<br>
or:<br>
<br>
signalName = pyqtSignal(types.MethodType)<br>
<br>
But simplest would be:<br>
<br>
signalName = pyqtSignal(object)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Regards<br>
Baz Walter<br>
_______________________________________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Bryan A. Jones, Ph.D.<br>
Associate Professor<br>Department of Electrical and Computer Engineering<br>231 Simrall / PO Box 9571<br>Mississippi State University<br>Mississippi state, MS 39762<br><a href="http://www.ece.msstate.edu/~bjones" target="_blank">http://www.ece.msstate.edu/~bjones</a><br>
bjones AT ece DOT msstate DOT edu<br>voice 662-325-3149<br>fax 662-325-2298<br><br>Our Master, Jesus Christ, is on his way. He'll show up right on<br>time, his arrival guaranteed by the Blessed and Undisputed Ruler,<br>
High King, High God.<br>- 1 Tim. 6:14b-15 (The Message)<br>
</div>