import dbus
import sys
import json
-import gobject
import fileinput
import termios, fcntl, os
-import glib
import curses.ascii
import traceback
+from gi.repository import GObject, GLib
from dbus.mainloop.glib import DBusGMainLoop
oldflags = fcntl.fcntl(fd, fcntl.F_GETFL)
fcntl.fcntl(fd, fcntl.F_SETFL, oldflags | os.O_NONBLOCK)
- io_stdin = glib.IOChannel(fd)
- io_stdin.add_watch(glib.IO_IN, handle_keyboard, data)
+ io_stdin = GLib.IOChannel(fd)
+ io_stdin.add_watch(GLib.IO_IN, handle_keyboard, data)
try:
erase_line()
display_prompt()
sys.stdout.flush()
- main_loop = gobject.MainLoop(None, False)
+ main_loop = GObject.MainLoop()
main_loop.run()
except KeyboardInterrupt:
sys.exit()