Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: TypeError error on tkinter.createfilehandler dummy example (http://www.velocityreviews.com/forums/t340566-re-typeerror-error-on-tkinter-createfilehandler-dummy-example.html)

Pedro Werneck 01-21-2005 02:31 PM

Re: TypeError error on tkinter.createfilehandler dummy example
 

Hi,

The createfilehandler is not supported on Windows since Tcl/TK 8.0.
tkinter.createfilehandler is None, so you get the NoneType is not
callable error.


I wrote a simple module with a mix-in class to solve this problem. I had
a lote of code using it on linux and needed to run it on Windows. I can
send it to you in pvt, if you want.



Pedro Werneck


On Fri, 21 Jan 2005 10:27:20 +0100
David <david.santiago@corp.ya.com> wrote:

> Hi,
>
> I'm getting the following error:
>
>
> Traceback (most recent call last):
> File "..\kk.py", line 37, in ?
> tkinter.createfilehandler(filex, tkinter.READABLE, _dispatch)
> TypeError: 'NoneType' object is not callable
>
>
> when executing this code on my Windows box:
>
>
> from Tkinter import *
>
> def _dispatch(self, *args):
> print "voila"
>
> filex = open('d:\\zz.txt', 'r')
> tkinter.createfilehandler(filex, tkinter.READABLE, _dispatch)
>
>
> Any ideas? What am I missing? I've been searching for something like
> this with no luck. I cannot imagine a simpler code for testing
> tkinter.createfilehandler functionality but it does not work :(
>
>
> TIA
>
> --
> David Santiago
>
>



All times are GMT. The time now is 07:02 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.