main.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:python-eduvpn-client 作者: eduvpn 项目源码 文件源码
def main():
    format_ = '%(asctime)s - %(levelname)s - %(name)s - %(message)s'
    logging.basicConfig(level=logging.INFO, format=format_)
    logger = logging.getLogger(__name__)

    if geteuid() == 0:
        logger.error("Running eduVPN client as root is not supported (yet)")
        exit(1)

    GObject.threads_init()

    if have_dbus():
        import dbus.mainloop.glib
        dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)

    # import this later so the logging is properly configured
    from eduvpn.ui import EduVpnApp

    edu_vpn_app = EduVpnApp()
    edu_vpn_app.run()
    Gtk.main()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号