File: utils.py

package info (click to toggle)
kiwi 1.9.22-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 11,912 kB
  • ctags: 5,549
  • sloc: python: 15,779; ansic: 193; xml: 77; makefile: 57; sh: 18
file content (23 lines) | stat: -rw-r--r-- 402 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import sys
import time

try:
    import pygtk
    pygtk.require('2.0')
except:
    pass

import gtk

def refresh_gui(delay=0):
    while gtk.events_pending():
        gtk.main_iteration_do(block=False)
    time.sleep(delay)

dir = os.path.dirname(__file__)
if not dir in sys.path:
    sys.path.insert(0, os.path.join(dir))

from kiwi.environ import environ
environ.add_resource('glade', dir)