Class definition example question
Grant Edwards
grant at nowhere.
Thu Dec 9 11:54:52 EST 1999
In article <19991209232342.51448 at nms.otc.telstra.com.au>, Greg McFarlane wrote:
>I think you could turn stdoutHandler() into a normal (private)
>method and then pass it into createfilehandler, like this:
>
>class execWindow(Pmw.ScrolledText):
>
> def run(self,progPath):
> ...
> Tkinter.tkinter.createfilehandler(self.__child.fromchild,
> Tkinter.tkinter.READABLE,
> self._stdoutHandler)
>
> def _stdoutHandler(self, file, mask):
> ...
>
>Or am I missing something?
Nope, you're not missing something -- that works fine. For some
reason the difference between the definition
def stdoutHandler(self, file, mask)
and the example prototype for a file handler
handler(file, mask)
prevented me from thinking of that (though it's the obvious
thing to do now that you point it out).
Thanks! I knew I was missing an obviously better way of doing
that.
--
Grant Edwards grante Yow! I need to discuss
at BUY-BACK PROVISIONS
visi.com with at least six studio
SLEAZEBALLS!!
More information about the Python-list
mailing list