主页
Python
Python tarfile 模块
demo_ref_module_tarfile_basic
运行 ❯
×
更改方向
保存代码
更改主题
import tarfile import io buffer = io.BytesIO() with tarfile.open(fileobj=buffer, mode='w') as tar: print('Tar archive created in memory') print(f'Format: {tar.format}')
Tar archive created in memory
Format: 2