Skip to content
Snippets Groups Projects
Commit 241d2106 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

Separate scripts of cli and gui

parent 085be7b0
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python
# Copyright (C) 2015 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
from agkyra import config
AGKYRA_DIR = config.AGKYRA_DIR
import logging
LOGFILE = os.path.join(AGKYRA_DIR, 'agkyra.log')
LOGGER = logging.getLogger('agkyra')
HANDLER = logging.FileHandler(LOGFILE)
FORMATTER = logging.Formatter("%(levelname)s:%(asctime)s:%(message)s")
HANDLER.setFormatter(FORMATTER)
LOGGER.addHandler(HANDLER)
LOGGER.setLevel(logging.INFO)
# run cli
from agkyra.cli import AgkyraCLI
from sys import argv
AgkyraCLI().onecmd(' '.join(argv[1:] or ['help', ]))
......@@ -32,8 +32,3 @@ LOGGER.setLevel(logging.INFO)
# # run GUI
from agkyra import gui
gui.run()
# run cli
# from agkyra.cli import AgkyraCLI
# from sys import argv
# AgkyraCLI().onecmd(' '.join(argv[1:] or ['help', ]))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment