Re: TypeError error on tkinter.createfilehandler dummy example

Discussion in 'Python' started by Pedro Werneck, Jan 21, 2005.

  1. 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 <> 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
    >
    >
    Pedro Werneck, Jan 21, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shumon
    Replies:
    1
    Views:
    11,772
    Jim Wu
    Sep 24, 2003
  2. lonelyplanet999

    Dummy perl programming question

    lonelyplanet999, Aug 13, 2003, in forum: Perl
    Replies:
    3
    Views:
    2,119
  3. Michael Spencer

    Tkinter.Text.edit_modified() TypeError

    Michael Spencer, Jan 15, 2004, in forum: Python
    Replies:
    0
    Views:
    382
    Michael Spencer
    Jan 15, 2004
  4. Replies:
    0
    Views:
    329
  5. Jo Schambach
    Replies:
    3
    Views:
    474
    Jo Schambach
    Nov 14, 2005
Loading...

Share This Page