diff options
author | Seth Hitefield <sdhitefield@gmail.com> | 2017-05-03 07:06:54 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2017-05-03 07:07:59 -0700 |
commit | 486e0a9d06e43f3b8669471bef13a5eeedbda4c6 (patch) | |
tree | 7d35c5e7fd530f7ff420b9d3bb77ff5fc9fb2ecf /grc/main.py | |
parent | 97b842874193394285ca4cdc11da381647c285fd (diff) |
grc: gtk3: Converted actions to Gio.Action instead of Gtk.Action
Diffstat (limited to 'grc/main.py')
-rwxr-xr-x | grc/main.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/grc/main.py b/grc/main.py index 305e8b8f78..224a9b11e8 100755 --- a/grc/main.py +++ b/grc/main.py @@ -22,10 +22,6 @@ gi.require_version('Gtk', '3.0') gi.require_version('PangoCairo', '1.0') from gi.repository import Gtk -from gnuradio import gr -from .gui.Platform import Platform -from .gui.Application import Application - VERSION_AND_DISCLAIMER_TEMPLATE = """\ GNU Radio Companion %s @@ -45,6 +41,7 @@ LOG_LEVELS = { def main(): + from gnuradio import gr parser = argparse.ArgumentParser( description=VERSION_AND_DISCLAIMER_TEMPLATE % gr.version()) parser.add_argument('flow_graphs', nargs='*') @@ -65,7 +62,8 @@ def main(): console = logging.StreamHandler() console.setLevel(LOG_LEVELS[args.log]) - msg_format = '[%(asctime)s - %(levelname)8s] --- %(message)s (%(filename)s:%(lineno)s)' + #msg_format = '[%(asctime)s - %(levelname)8s] --- %(message)s (%(filename)s:%(lineno)s)' + msg_format = '[%(levelname)s] %(message)s (%(filename)s:%(lineno)s)' date_format = '%I:%M' formatter = logging.Formatter(msg_format, datefmt=date_format) @@ -73,8 +71,14 @@ def main(): console.setFormatter(formatter) log.addHandler(console) - log.debug("Loading platform") + log.debug("Running main") + # Delay importing until the logging is setup + # Otherwise, the decorators could not use logging. + from .gui.Platform import Platform + from .gui.Application import Application + + log.debug("Loading platform") platform = Platform( version=gr.version(), version_parts=(gr.major_version(), gr.api_version(), gr.minor_version()), |