TypeError error on tkinter.createfilehandler dummy example

David david.santiago at corp.ya.com
Fri Jan 21 04:27:20 EST 2005


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050121/9dde89be/attachment.html>


More information about the Python-list mailing list