随笔分类 - pythonWindows相关
摘要:import os import logging import time import sys import threading # print(sys.path) # from lib.run_cmd import runCommand_wait,runCommand logger = loggi
阅读全文
摘要:1. pip install xlwings https://zhuanlan.zhihu.com/p/82783751?utm_source=wechat_session&utm_medium=social&utm_oi=1087267078251094016&utm_campaign=share
阅读全文
摘要:【原始】打开记事本 def createFile(filename): if os.path.exists(filename) == False: open(filename, "a").close() if os.path.getsize(filename): pass else: f = ope
阅读全文
摘要:smbclient方法 def check_smb_img(): smbclient.register_session("1.1.1.1", username="name", password="password") img_path = smbclient.listdir(r"\\1.1.1.1\
阅读全文
摘要:指定启动参数 -X utf8 C:\Users\python.exe -X utf8 C:\Scripts\ride.py 重写函数 # Python 和 encoding 相关的配置主要有下面几个: locale.getpreferredencoding() 这个用的是最广的。 这是 Python
阅读全文
摘要:import platform os_platform = platform.platform() # Windows-10-10.0.18362-SP0
阅读全文
摘要:以下写法都可以 file = r'C:\config.yaml' file = 'C:\config.yaml' file = 'C:\\config.yaml' file = r'C:\\config.yaml' file = r'C:/config_auto_ui.yaml' file = 'C
阅读全文
浙公网安备 33010602011771号