home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / lib / python2.4 / site-packages / UpdateManager / Common / utils.pyo (.txt) < prev   
Encoding:
Python Compiled Bytecode  |  2006-08-31  |  1.1 KB  |  26 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.4)
  3.  
  4. import gtk
  5.  
  6. def str_to_bool(str):
  7.     if str == '0' or str.upper() == 'FALSE':
  8.         return False
  9.     
  10.     return True
  11.  
  12.  
  13. def utf8(str):
  14.     return unicode(str, 'latin1').encode('utf-8')
  15.  
  16.  
  17. def error(parent, summary, message):
  18.     d = gtk.MessageDialog(parent = parent, flags = gtk.DIALOG_MODAL, type = gtk.MESSAGE_ERROR, buttons = gtk.BUTTONS_CLOSE)
  19.     d.set_markup('<big><b>%s</b></big>\n\n%s' % (summary, message))
  20.     d.realize()
  21.     d.window.set_functions(gtk.gdk.FUNC_MOVE)
  22.     d.set_title('')
  23.     res = d.run()
  24.     d.destroy()
  25.  
  26.