Python Bytecode
See what CPython compiles your code into — beside your source. Inspect bytecode for a file, function or class without leaving the IDE. Follow source lines into disassembly, read opcode documentation, and copy or export the output. Get…
Use the free feature set and check the current Pro evaluation and pricing options on JetBrains Marketplace.
What Python Bytecode Does
See what CPython compiles your code into — beside your source.
Inspect bytecode for a file, function or class without leaving the IDE. Follow source lines into disassembly, read opcode documentation, and copy or export the output.
Get started
- Install Python Bytecode in PyCharm or IntelliJ IDEA with Python support enabled.
- Select a local CPython interpreter as your project's Python SDK. A virtual environment's interpreter also works.
- Open a
.pyfile to see source and bytecode side by side. Use the editor layout controls if only one pane is visible. - Select a function or class from Entire File to focus the output.
While you edit
- Refresh automatically as you type, or use Update Bytecode for a manual refresh.
- Highlight corresponding source and bytecode lines where a source-line mapping is available.
- Read opcode descriptions and Python documentation links with the IDE's Quick Documentation command.
- Copy the displayed bytecode or export it as TXT or syntax-colored HTML.
- Configure auto-update and its delay in Settings > Tools > Python Bytecode.
Default shortcuts: Alt+Shift+B to refresh and Alt+Shift+E to export. Shortcuts depend on your keymap.
Requirements and limitations
A local Python project SDK is required. A module-only SDK or an SSH/Docker interpreter does not replace it. The viewer compiles and disassembles your source without executing the module; it includes unsaved edits. Bytecode depends on the selected Python version.
If you see No Python SDK, select a local project interpreter and refresh. Fix source syntax errors before generating bytecode. Files over 10,000 lines require a manual refresh.
Links
Getting Started
- Open the plugin page on JetBrains Marketplace.
- Install it in a compatible IDE and restart if prompted.
- Open your project and follow the plugin's setup guidance.
User Reviews
Doesn't work, and the "Update" button that is supposed to display the python bytecode freezes the IDE.
It's not clear to me how to actually view any bytecode with this plugin. Also the developer website has HSTS enabled but an invalid self-signed certificate which prevents Firefox from loading the site. There's no user information on the GitHub either.
So how do I use this?
Ready to try Python Bytecode?
Use the free feature set and check the current Pro evaluation and pricing options on JetBrains Marketplace.