pythonpython 把文件夹压缩成tar python通过tarfile模块压缩文件夹import tarfileimport osimport sysuser = os.getenv('USERNAME')filename = '/home/%s/tmp.tgz' % userprint 'The tar file was ……继续阅读 » 水墨上仙 5年前 (2019-08-02) 1241浏览 1438个赞