33 lines
991 B
Python
33 lines
991 B
Python
# main loop
|
|
# Copyright (C) 2019 Nguyễn Gia Phong
|
|
#
|
|
# This file is part of Axuy
|
|
#
|
|
# Axuy is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published
|
|
# by the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# Axuy 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 Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with Axuy. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
__doc__ = 'Axuy main loop'
|
|
__all__ = ['main']
|
|
|
|
from .control import Control, CtlConfig
|
|
|
|
|
|
def main():
|
|
"""Parse arguments and start main loop."""
|
|
config = CtlConfig()
|
|
config.parse()
|
|
with Control(config) as peer: peer.run()
|
|
|
|
|
|
if __name__ == '__main__': main()
|