summaryrefslogtreecommitdiff
path: root/gtk/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/__init__.py')
-rw-r--r--gtk/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/__init__.py b/gtk/__init__.py
index b880c8ca..853e9b87 100644
--- a/gtk/__init__.py
+++ b/gtk/__init__.py
@@ -22,7 +22,7 @@
import os
import sys
-from types import ModuleType as _module
+from types import ModuleType
# this can go when things are a little further along
try:
@@ -40,11 +40,12 @@ if not hasattr(sys, 'argv'):
import gobject as _gobject
from gtk._gtk import *
+from gtk._lazyutils import LazyModule
from gtk.deprecation import _Deprecated, _DeprecatedConstant
-from gtk import keysyms
-
import gdk
+keysyms = LazyModule('keysyms', locals())
+
def _init():
import sys
@@ -64,6 +65,7 @@ def _init():
# install the default log handlers
add_log_handlers()
+
gdk.INPUT_READ = _gobject.IO_IN | _gobject.IO_HUP | _gobject.IO_ERR
gdk.INPUT_WRITE = _gobject.IO_OUT | _gobject.IO_HUP
gdk.INPUT_EXCEPTION = _gobject.IO_PRI
@@ -98,6 +100,6 @@ FALSE = _DeprecatedConstant(False, 'gtk.FALSE', 'False')
# Can't figure out how to deprecate gdk.Warning
gdk.Warning = Warning
-del _Deprecated, _DeprecatedConstant, _gobject, _module,
+del _Deprecated, _DeprecatedConstant, _gobject
_init()