lbry-sdk/packaging/osx/lbry-osx-app/lbrygui/main.py

26 lines
592 B
Python
Raw Normal View History

from PyObjCTools import AppHelper
from twisted.internet.cfreactor import install
install(runner=AppHelper.runEventLoop)
from twisted.internet import reactor
import logging
2016-10-23 07:33:29 +02:00
from lbrynet import conf
from lbrynet.core import log_support
from LBRYApp import LBRYDaemonApp
2016-10-23 07:33:29 +02:00
log = logging.getLogger()
def main():
2016-10-23 07:33:29 +02:00
log_file = conf.get_log_filename()
log_support.configure_logging(log_file, console=False)
app = LBRYDaemonApp.sharedApplication()
reactor.addSystemEventTrigger("after", "shutdown", AppHelper.stopEventLoop)
reactor.run()
2016-10-23 07:33:29 +02:00
if __name__ == "__main__":
main()