.PYZ 文件扩展名

Python Application Zip File

开发者 Python Software Foundation
受欢迎程度
3.8  |  5 
 

什么是 PYZ 文件?

A PYZ file is an executable Python application stored in a compressed or uncompressed .ZIP archive. It contains a .PY script (likely named __main__.py) and may also include Python modules, libraries, and resource files. Users package and share Python applications as PYZ files to share with others who can securely run them across different platforms without installation.

更多信息

You can create a .pyz file using the "zipapp" module in Python's standard library. To create a PYZ file, type the following:

import zipapp

zipapp.create_archive('filename.pyz', interpreter='path_to_python')

注: PYZ files run in the Python console window, while PYZW files store a Python Windows (GUI) application.

如何打开 PYZ 文件

You can open PYZ files with the Python interpreter (beginning with version 2.6) on any platform. For example, you can type the following in Python to run a Python application in a PYZ file: python filename.pyz. You can also run a PYZ file in Windows by double-clicking it.

Since PYZ files are renamed ZIP files, you can open them with a standard compression utility, such as "Windows File Explorer," Apple Archive Utility (macOS), Corel WinZip (Windows), or Corel WinZip Mac (macOS). You may need to rename the file extension from .pyz to .zip.

使用File Viewer Plus打开 400 多种文件格式。免费下载

可打开 PYZ 文件的程序

验证者 FileInfo.com

FileInfo.com 团队 独立研究了本页面列出的 Python Application Zip 文件格式和 Mac, Windows, and Linux 应用。 我们的目标是达到 100% 的准确率,并且仅发布我们已验证过的文件类型信息。

如果您想为此页面提出新增或更新建议,请告诉我们