1 解压rar
# coding=utf-8 import rarfile path = "/home/sxtj/han/yy/dataraw.rar" path1 = "/home/sxtj/han/yy/解压后/" # 待解压文件 rf = rarfile.RarFile(path) # 解压指定文件路径 rf.extractall(path1)