def download_cniplist(p): msg = buildipdb.download_cniplist_as_db(direct_ipdb, p) if msg: balloons_warning(msg)
import buildipdb MFS_CHECKED = win32_adapter.MFS_CHECKED MFS_DISABLED = win32_adapter.MFS_DISABLED MFS_DEFAULT = win32_adapter.MFS_DEFAULT MFT_RADIOCHECK = win32_adapter.MFT_RADIOCHECK fixed_fState = MFS_CHECKED | MFS_DISABLED last_main_menu = None sub_menu1 = ( ('打开默认配置', lambda x: Popen(CONFIG_FILENAME, shell=True)), #双击打开第一个有效命令 ('打开用户配置', lambda x: Popen(CONFIG_USER_FILENAME, shell=True)), ('打开自动规则配置', lambda x: Popen(CONFIG_AUTO_FILENAME, shell=True))) sub_menu2 = (('建议更新频率:10~30 天一次', 'pass', MFS_DISABLED), (None, '-'), ( 'Ⅰ 从 APNIC 下载(每日更新)', lambda x: buildipdb.download_cniplist_as_db(ipdb_direct, buildipdb.p_APNIC) ), ('Ⅱ 从 17mon 下载(每月初更新)', lambda x: buildipdb.download_cniplist_as_db(ipdb_direct, buildipdb.p_17MON) ), ('Ⅲ 从 gaoyifan 下载(每日更新)', lambda x: buildipdb.download_cniplist_as_db( ipdb_direct, buildipdb.p_GAOYIFAN)), ('从 Ⅰ、Ⅱ 下载后合并', lambda x: buildipdb.download_cniplist_as_db( ipdb_direct, buildipdb.p_APNIC | buildipdb.p_17MON)), ('从 Ⅰ、Ⅲ 下载后合并', lambda x: buildipdb.download_cniplist_as_db( ipdb_direct, buildipdb.p_APNIC | buildipdb.p_GAOYIFAN)), ('从 Ⅱ、Ⅲ 下载后合并', lambda x: buildipdb.download_cniplist_as_db( ipdb_direct, buildipdb.p_17MON | buildipdb.p_GAOYIFAN)), ('全部下载后合并', lambda x: buildipdb.download_cniplist_as_db( ipdb_direct, buildipdb.p_APNIC | buildipdb.p_17MON | buildipdb .p_GAOYIFAN)))