qubes-installer-qubes-os/firstboot/firstboot/functions.py
2011-03-31 13:42:52 +02:00

27 lines
448 B
Python

import gtk
import os
def loadPixbuf(fn):
return gtk.gdk.pixbuf_new_from_file(fn)
def loadToImage(fn):
pix = loadPixbuf(fn)
pixWidget = gtk.Image()
pixWidget.set_from_pixbuf(pix)
return pixWidget
def start_process(path, args = None):
if args == None:
args = [path]
else:
args = [path, args]
child = os.fork()
if not child:
os.execvp(path, args)
os._exit(1)
return child