コード例 #1
0
ファイル: main_app.py プロジェクト: Hmamouche/NeuroTSConvers
    def __init__(self):
        """Wx Application initialization.

        Create the application for the GUI of SPPAS based on Phoenix.

        """
        self.__cfg = sppasAppConfig()
        wx.App.__init__(self,
                        redirect=False,
                        filename=self.__cfg.log_file,
                        useBestVisual=True,
                        clearSigInt=True)

        self.SetAppName(sg.__name__)
        self.SetAppDisplayName(self.__cfg.name)
        wx.SystemOptions.SetOption("mac.window-plain-transition", 1)
        wx.SystemOptions.SetOption("msw.font.no-proof-quality", 0)

        # Fix language and translation
        lang = wx.LANGUAGE_DEFAULT
        self.locale = wx.Locale(lang)

        # Fix logging. Notice that Settings will be fixed at 'run'.
        self.settings = None
        self._logging = None
        self.process_command_line_args()
        self.setup_python_logging()
コード例 #2
0
 def __init__(self):
     """Wx Application initialization."""
     # Initialize the wx application
     wx.App.__init__(self,
                     redirect=False,
                     filename=None,
                     useBestVisual=True,
                     clearSigInt=True)
     self.cfg = sppasAppConfig()
     self.settings = WxAppSettings()
コード例 #3
0
ファイル: acmtrain.py プロジェクト: Hmamouche/NeuroTSConvers
parser.add_argument("--quiet", action='store_true', help="Disable the verbosity.")

if len(sys.argv) <= 1:
    sys.argv.append('-h')

args = parser.parse_args()

# ----------------------------------------------------------------------------
# Main program
# ----------------------------------------------------------------------------

# Redirect all messages to logging
# --------------------------------

with sppasAppConfig() as cg:
    if not args.quiet:
        log_level = cg.log_level
    else:
        log_level = cg.quiet_log_level
    lgs = sppasLogSetup(log_level)
    lgs.stream_handler()

# --------------------------------

if os.path.exists(args.o):
    model = os.path.join(args.o, "hmmdefs")
    if os.path.exists(model):
        print("A model with name {:s} is already existing.".format(args.o))
        sys.exit(1)