Menu

#607 Error with gtk.gdk.threads_init()

1.3.10
closed-fixed
Editor (491)
5
2007-11-27
2007-11-26
muriloq
No

I imported the package gtk

import gtk

And then call

gtk.gdk.threads_init()

(I'm writing a PyGTK multithreaded application)

The code runs fine, but PyDev indicates the following error in the line above:

Undefined variable from import: threads_init

I'm using:

PyDEV 1.3.10
Eclipse SDK 3.3.1.1
Ubuntu 7.10 "Gutsy Gibbon"
Python 2.5.1, PyGTK 2.12.0 (Gtk+ 2.12.0)

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2007-11-27

    Logged In: YES
    user_id=617340
    Originator: NO

    Try adding pygtk to the 'forced builtins' (http://www.fabioz.com/pydev/manual_101_interpreter.html)

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-11-27
    • status: open --> pending
     
  • muriloq

    muriloq - 2007-11-27
    • status: pending --> closed-fixed
     
  • muriloq

    muriloq - 2007-11-27

    Logged In: YES
    user_id=1945818
    Originator: YES

    Thanks, adding gtk (not pygtk) to 'forced builtins' solved the problem. I did the same thing with gobject, too.