def main(): logger.debug('IPPhone') logger.debug('開始') server_address = os.environ['SERVER_ADDRESS'] config = { 'server_address': (server_address, 5060), 'local_uri': ('6002', server_address, 5061), 'password': '******', 'expires': 3600, } event.init() com.init() drv.init(config) reg.init(config) dialog.init(config) display.init() threading.Thread(target=drv.recv, daemon=True).start() threading.Thread(target=event.main, daemon=True).start() while cmd(): pass logger.debug('終了')
def main(): global g_paths global g_path # load the environment variables. environment.init() # initialiase the dialog package. dialog.init() # initialize the 'g_path' variable. g_path = "configure.frm" g_paths.append(g_path) # main loop until there is a frame or variable to display. while True: # load the information on the current frame. load(g_path) # handle the current frame: display, get the user choice etc. frame()
# load the fxditem to make sure it's the first in the # mimetypes list import fxditem # load all plugins import plugin # prepare the skin skin.prepare() # Fire up splashscreen and load the plugins splash = Splashscreen( _('Starting Freevo-%s, please wait ...') % version.version) skin.register('splashscreen', ('screen', splash)) plugin.init(splash.progress) dialog.init() skin.delete('splashscreen') # Fire up splashscreen and load the cache if config.MEDIAINFO_USE_MEMORY == 2: import util.mediainfo splash = Splashscreen(_('Reading cache, please wait ...')) skin.register('splashscreen', ('screen', splash)) cachefiles = [] for type in ('video', 'audio', 'image', 'games'): if plugin.is_active(type): n = 'config.%s_ITEMS' % type.upper() x = eval(n) for item in x:
# load the fxditem to make sure it's the first in the # mimetypes list import fxditem # load all plugins import plugin # prepare the skin skin.prepare() # Fire up splashscreen and load the plugins splash = Splashscreen(_('Starting Freevo-%s, please wait ...') % version.version) skin.register('splashscreen', ('screen', splash)) plugin.init(splash.progress) dialog.init() skin.delete('splashscreen') # Fire up splashscreen and load the cache if config.MEDIAINFO_USE_MEMORY == 2: import util.mediainfo splash = Splashscreen(_('Reading cache, please wait ...')) skin.register('splashscreen', ('screen', splash)) cachefiles = [] for type in ('video', 'audio', 'image', 'games'): if plugin.is_active(type): n = 'config.%s_ITEMS' % type.upper() x = eval(n) for item in x:
root.settings["graphics"]["color_depth"]) pygame.display.set_caption("[Loading...]") scrollingscreen = rotutil.ScrollingWorldManager(root, screen.image) root.screen = scrollingscreen serialize.init(root) ship.init(root) item.init(root) primitives.init(root) tasks.init(root) ai.init(root) ui_states.init(root) sectors.init(root) newgame.init(root) dialog.init(root) quests.init(root) eb.init_grufs(root) faction.init(root) lang.init() import music music.init() root.gfxcursor = gfxcursor.GfxCursor(root, root.screen.screen) root.particlemanager = particles.ParticleManager() root.state_manager = state.StateManager(root) root.console = pyconsole.Console(screen.image, (0, 0, 1300, 200), localsx=locals())