Package: zhangwei-helper
#zhangwei_helper
zhangwei_helper is a package include all common part,like function,enum,writtenby zhang wei(zwzw911)installpip install zhangwei-helpercontentenumSelfEnumdescription: a module include self defined enumusage:import zhangwei_helper.SelfEnum as self_enumCpuBits: bits64/bits32OsType: Windows/LinuxWindowsVersion: Windows7/Windows8/Windows10/UnknownWindowsBits: Win32/Win64PythonVersion: Python2/Python3/UnknownProxyType: Transparent/Anonymous/High_anonymousBrowserType: FireFox/Chrome/Allfunctionosdescription: a module include some functions about osusage:import zhangwei_helper.function.Os as zw_osget_cpu_bits(): 枚举(CpuBits)：cpu的位数get_os_type(): 枚举(OsType)：os的类型：windows或者linuxget_windows_ver(): 枚举(WindowsVersion)：windows的版本（7/8/10）get_windows_bits(): 枚举(WindowsBits)：windows的位数：32或者64windows_login_as_admin(): Boolean：当前是否以admin登录get_python_major_version():枚举(PythonVersion)：返回python的大版本号：2或者3或者unknownWindowsServicedescription: a module include some functions about osusage:import zhangwei_helper.function.WindowsServices as zw_winserif_service_exists(): Boolean：服务是否存在if_service_running(): Booleans:服务是否运行Networkdescription: a module include some functions about networkusage:import zhangwei_helper.function.Network as zw_networkextract_protocol_from_url(url)：获得协议http或者httpsextract_host_from_url(url)：获得hostextract_base_url_from_url(url)：获得基础urlhttps://github.comgen_proxies_from_ip(ip): 根据IP生成request/request_html需要的代理detect_if_need_proxy(url): Boolean:是否需要代理detect_if_proxy_usable(proxies, timeout=5, url='https://www.baidu.com'）：Boolean：代理是否有效detect_url_exist(url, proxies, headers): url是否存在（返回404）send_request_get_response(**args): request_html或者error。同步获得页面htmlasync_send_request_get_response(**args): request_html或者error。异步获得页面htmldownload_file(url,save_path): Error(下载失败）；None（下载成功）download_unzip_chrome_driverdownload_unzip_firefox_driverSoftwaredescription: a module include some functions about softwareusage:check_minimum_python_version(ver=str): Error（python版本不匹配或者未安装）；python安装路径check_firefox_version(): None（未安装FF）；FF版本（自动补齐.0）check_chrome_version(): None（未安装）：chrome版本check_driver_exist(python_dir, browser_type): 检查对应的driver在python目录下是否存在unzip_file():解压zip文件到指定目录is_valid_zip_file():是否为合格的zip文件Regeditdescription: a module include some functions to operate windows regusage:_open_item: 返回item_read_key_value：读取item下一个key的值和类型_save_key_value：以某种类型的方式，把值保存到某个key中read_PATH_value：读取环境变量PATH的值append_value_in_PATH：为PATH添加一个值del_value_in_PATH：从PATH中删除一个值check_key_value_exists(key,value_name)：检查某个key小，value_name是否存在create_value(key,value_name,value_type,value): 直接调用_save_key_valuedelete_value(key,value_name): 删除key下的valuechange history0.0.1  add SelfEnum/Os/WindowsServices0.0.2  add const/Const.py, function/Network.py, function/Software0.0.3  add function/TypeCheck, add new enum VariantType, add test case for function/TypeCheck
0.0.4  fix issue of network/gen_proxies_from_ip & download_file & download_unzip_firefox_driver
0.0.5  add new function/Regedit.py, to operate windows reg
0.0.6  add create/delete_value/check_key_value_exists in function/Regedit.py0.0.7  software/get_chrome_version: from 2 different place get version and raise error if not found, so that can be caught by outer functionHKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Google ChromeHKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon