摘要:        
1.删除文件夹 import shutil shutil.rmtree('文件夹') 2.拷贝文件夹 import shutil shutil.copytree('message', 'new_message') 3.拷贝文件 import shutil shutil.copy('db.xlsx',    阅读全文
posted @ 2021-12-10 15:02
咖啡馆
阅读(59)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1.当前目录执行命令: import subprocess res = subprocess.getoutput('ls') print(res) 2.指定目录执行命令: import subprocess res = subprocess.check_output('ls',shell=True,    阅读全文
posted @ 2021-12-10 14:43
咖啡馆
阅读(76)
评论(0)
推荐(0)
        
            
        
        
摘要:        
md5加密(不可逆) import hashlib pwd = '123' obj = hashlib.md5() obj.update(pwd.encode('utf-8')) res = obj.hexdigest() print(res) 避免撞库风险,加盐 # -*- coding: utf    阅读全文
posted @ 2021-12-10 14:01
咖啡馆
阅读(293)
评论(0)
推荐(0)
        
                    
                
浙公网安备 33010602011771号