PYC Format

PYC Format

Support for Python compiled bytecode files.

PYC files are compiled bytecode versions of Python source code. These compiled files can be deployed in place of the original source code, serving as a bytecode format for execution by the Python interpreter. PYC files are tied to the specific version of Python they were compiled with, necessitating recompilation when different Python versions are used.

The support is designed to be fully compatible with all Python versions, enabling users to delve into the intricacies of the complete PYC file format and its instructions.

The package also allows the integration of an external decompiler through the settings.

Once the external decompiler is set up, accessing the decompiled source code is achievable with just a single click.

The package is exposed to the SDK:

from Pro.Core import *
from Pkg.PYC import *

def disassemblePYC(fname):
    c = createContainerFromFile(fname)
    if c.isNull():
    obj = PYCObject()
    if not obj.Load(c) or not obj.Parse():
    out = NTTextBuffer()