~ubuntu-branches/ubuntu/trusty/buxon/trusty

« back to all changes in this revision

Viewing changes to run.py

  • Committer: Bazaar Package Importer
  • Author(s): Nacho Barrientos Arias
  • Date: 2011-08-28 11:36:14 UTC
  • mfrom: (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110828113614-wt8f10vp2z8vbs7s
Tags: 0.0.5-3
* debian/patches (+1 patches)
 - manpage-typos: s/a RDF/an RDF/

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import sys
24
24
import os
25
25
import logging
 
26
import gtk
 
27
import gtk.glade
26
28
import pygtk
27
29
pygtk.require('2.0')
28
 
from gazpacho.loader.loader import ObjectBuilder
29
30
 
30
31
try:
31
32
    import rdflib
85
86
        """
86
87
 
87
88
        #configure buxon logger
88
 
        self.logger = logging.getLogger('buxon')
89
 
        self.logger.setLevel(logging.DEBUG)
90
 
        _hdlr = logging.StreamHandler()
91
 
        _hdlr.setFormatter(logging.Formatter('%(asctime)s %(name)s %(levelname)s: %(message)s'))
92
 
        self.logger.addHandler(_hdlr)
93
 
 
94
 
        self.logger.info('Starting up Buxon')
 
89
        logging.basicConfig(level=logging.DEBUG, format="%(asctime)s %(levelname)s: %(message)s", stream=sys.stdout)
 
90
        logging.info('Starting up Buxon main window')
95
91
 
96
92
        sys.path.append(base + 'src')
97
93
        
102
98
            global callbacks
103
99
            global buxon
104
100
 
105
 
            widgets = ObjectBuilder(base + 'includes/ui/graphical/buxon.glade')
 
101
            widgets = gtk.glade.XML(base + 'includes/ui/graphical/buxon.glade')
106
102
            callbacks = Callbacks()
107
103
            widgets.signal_autoconnect(Callbacks.__dict__)
108
 
            self.logger.debug('GUI loaded')
 
104
            logging.debug('GUI loaded')
109
105
 
110
106
            buxon = BuxonWindow(widgets, base)
111
107
 
118
114
                buxon.main()
119
115
 
120
116
        except KeyboardInterrupt:
121
 
            self.logger.info('Received Ctrl+C or another break signal. Exiting...')
 
117
            logging.info('Received Ctrl+C or another break signal. Exiting...')
122
118
            sys.exit()
123
119
 
124
120