def __init__(self, argv, base='./'): """ All operation that Buxon need to run """ #configure buxon logger self.logger = logging.getLogger('buxon') self.logger.setLevel(logging.DEBUG) _hdlr = logging.StreamHandler() _hdlr.setFormatter( logging.Formatter( '%(asctime)s %(name)s %(levelname)s: %(message)s')) self.logger.addHandler(_hdlr) self.logger.info('Starting up Buxon') sys.path.append(base + 'src') sys.path.append(base + 'lib') from buxon.ui.buxonwindow import BuxonWindow try: global widgets global callbacks global buxon widgets = ObjectBuilder(base + 'includes/ui/graphical/buxon.glade') callbacks = Callbacks() widgets.signal_autoconnect(Callbacks.__dict__) self.logger.debug('GUI loaded') buxon = BuxonWindow(widgets, base) if ('-h' in argv or '--help' in argv): buxon.usage() if (len(argv) > 0): buxon.main(argv[0]) else: buxon.main() except KeyboardInterrupt: self.logger.info( 'Received Ctrl+C or another break signal. Exiting...') sys.exit()
def __init__(self, argv, base='./'): """ All operation that Buxon need to run """ #configure buxon logger self.logger = logging.getLogger('buxon') self.logger.setLevel(logging.DEBUG) _hdlr = logging.StreamHandler() _hdlr.setFormatter(logging.Formatter('%(asctime)s %(name)s %(levelname)s: %(message)s')) self.logger.addHandler(_hdlr) self.logger.info('Starting up Buxon') sys.path.append(base + 'src') sys.path.append(base + 'lib') from buxon.ui.buxonwindow import BuxonWindow try: global widgets global callbacks global buxon widgets = ObjectBuilder(base + 'includes/ui/graphical/buxon.glade') callbacks = Callbacks() widgets.signal_autoconnect(Callbacks.__dict__) self.logger.debug('GUI loaded') buxon = BuxonWindow(widgets, base) if ('-h' in argv or '--help' in argv): buxon.usage() if (len(argv)>0): buxon.main(argv[0]) else: buxon.main() except KeyboardInterrupt: self.logger.info('Received Ctrl+C or another break signal. Exiting...') sys.exit()
def __init__(self, argv, base='./'): """ All operation that Buxon need to run """ #configure buxon logger logging.basicConfig(level=logging.DEBUG, format="%(asctime)s %(levelname)s: %(message)s", stream=sys.stdout) logging.info('Starting up Buxon main window') sys.path.append(base + 'src') from buxon.ui.buxonwindow import BuxonWindow try: global widgets global callbacks global buxon widgets = gtk.glade.XML(base + 'includes/ui/graphical/buxon.glade') callbacks = Callbacks() widgets.signal_autoconnect(Callbacks.__dict__) logging.debug('GUI loaded') buxon = BuxonWindow(widgets, base) if ('-h' in argv or '--help' in argv): buxon.usage() if (len(argv) > 0): buxon.main(argv[0]) else: buxon.main() except KeyboardInterrupt: logging.info('Received Ctrl+C or another break signal. Exiting...') sys.exit()
def __init__(self, argv, base='./'): """ All operation that Buxon need to run """ #configure buxon logger logging.basicConfig(level=logging.DEBUG, format="%(asctime)s %(levelname)s: %(message)s", stream=sys.stdout) logging.info('Starting up Buxon main window') sys.path.append(base + 'src') from buxon.ui.buxonwindow import BuxonWindow try: global widgets global callbacks global buxon widgets = gtk.glade.XML(base + 'includes/ui/graphical/buxon.glade') callbacks = Callbacks() widgets.signal_autoconnect(Callbacks.__dict__) logging.debug('GUI loaded') buxon = BuxonWindow(widgets, base) if ('-h' in argv or '--help' in argv): buxon.usage() if (len(argv)>0): buxon.main(argv[0]) else: buxon.main() except KeyboardInterrupt: logging.info('Received Ctrl+C or another break signal. Exiting...') sys.exit()