コード例 #1
0
ファイル: app.py プロジェクト: VitaeTeam/ViLight
def main():
    cleanup_tmp_dir()

    config_options = {
        'verbose': is_debug_build(),
        'cmd': 'gui',
        'gui': 'ios_native',
        'cwd': os.getcwd(),
        'whitelist_servers_only':
        True,  # on iOS we force only the whitelist ('preferred') servers only for now as a security measure
    }

    set_verbosity(config_options.get('verbose'),
                  timestamps=False,
                  thread_id=False)
    NSLogSuppress(not config_options.get('verbose'))

    MonkeyPatches.patch()

    config = SimpleConfig(config_options, read_user_dir_function=get_user_dir)

    gui = ElectrumGui(config)
    call_later(
        0.010, gui.main
    )  # this is required for the activity indicator to actually animate. Switch to a direct call if not using activity indicator on Splash2

    _printStats(
        config_options
    )  # Prints some startup/debug stats such as Python version and SSL version (this is done in another thread to hopefully not impact startup overhead too much, as importing ssl may be a bit heavy)

    return "Vitae FTW!"
コード例 #2
0
def main():
    cleanup_tmp_dir()

    config_options = {
        'verbose': is_debug_build(),
        'cmd': 'gui',
        'gui': 'ios_native',
        'cwd': os.getcwd(),
    }

    set_verbosity(config_options.get('verbose'),
                  timestamps=False,
                  thread_id=False)
    NSLogSuppress(not config_options.get('verbose'))

    MonkeyPatches.patch()

    #for k,v in config_options.items():
    #    print("config[%s] = %s"%(str(k),str(v)))

    config = SimpleConfig(config_options, read_user_dir_function=get_user_dir)

    gui = ElectrumGui(config)
    call_later(
        0.010, gui.main
    )  # this is required for the activity indicator to actually animate. Switch to a direct call if not using activity indicator on Splash2

    return "Bitcoin Cash FTW!"
コード例 #3
0
def main():
    cleanup_tmp_dir()

    config_options = {
        'verbose': is_debug_build(),
        'cmd': 'gui',
        'gui': 'ios_native',
        'cwd': os.getcwd(),
        'testnet': 'EC_TESTNET' in os.
        environ,  # You can set the env when testing using Xcode "Scheme" editor
    }

    if config_options.get('testnet'):
        set_testnet()
    else:
        set_mainnet()

    set_verbosity(config_options.get('verbose'),
                  timestamps=False,
                  thread_id=False)
    NSLogSuppress(not config_options.get('verbose'))

    MonkeyPatches.patch()

    config = PatchedSimpleConfig(config_options,
                                 read_user_dir_function=get_user_dir)

    gui = ElectrumGui(config)
    call_later(
        0.010, gui.main
    )  # this is required for the activity indicator to actually animate. Switch to a direct call if not using activity indicator on Splash2

    _printStats(
        config_options
    )  # Prints some startup/debug stats such as Python version and SSL version (this is done in another thread to hopefully not impact startup overhead too much, as importing ssl may be a bit heavy)

    return "Bitcoin Cash FTW!"