Skip to main content
1360 votes
13 answers
713k views

Python is an interpreted language. But why does my source directory contain .pyc files, which are identified by Windows as "Compiled Python Files"?
froadie's user avatar
  • 83.7k
266 votes
10 answers
578k views

Is it possible to get some information out of the .pyc file that is generated from a .py file?
Howard 's user avatar
  • 2,661
520 votes
3 answers
387k views

What do these python file extensions mean? .pyc .pyd .pyo What are the differences between them and how are they generated from a *.py file?
Yanki Twizzy's user avatar
  • 8,091
103 votes
3 answers
61k views

I understand that ".pyc" files are compiled versions of the plain-text ".py" files, created at runtime to make programs run faster. However I have observed a few things: Upon modification of "py" ...
Aaron Schif's user avatar
  • 2,442
60 votes
4 answers
33k views

Is there a way to change the directory where .pyc file are created by the Python interpreter? I saw two PEPs about that subject (0304 and 3147), but none seems to be implemented in the default ...
Scharron's user avatar
  • 17.9k
19 votes
3 answers
9k views

I've started working on a commercial application in Python, and I'm weighing my options for how to distribute the application. Aside from the obvious (distribute sources with an appropriate ...
leedm777's user avatar
  • 24.2k
13 votes
1 answer
14k views

I have a .pyc file. I need to understand the content of that file to know how the disassembler works of python, i.e. how can I generate a output like dis.dis(function) from .pyc file content. for e.g....
Niya Simon C's user avatar
19 votes
3 answers
11k views

I know the difference between a .py and a .pyc file. My question is not about how, but about why According to the docs: A program doesn’t run any faster when it is read from a .pyc or .pyo file ...
OrangeTux's user avatar
  • 11.5k
19 votes
3 answers
33k views

A Python module is automatically compiled into a .pyc file by CPython interpreter. The .pyc file, which contains the bytecode, is in binary format (marshaled code?). Is there a GUI (or command line) ...
dividebyzero's user avatar
  • 1,283
5 votes
2 answers
19k views

I am running mint 13 and have python 3.2 installed using the apt-get package management system. I also have python 2.7 installed along with 3.2 The pycompile seems to be the one that packages python 2....
Lord Loh.'s user avatar
  • 2,477
2 votes
3 answers
53k views

Currently, I have a PYC file for the 3.9.2 version of python (P.S: This applies to all versions 3.9 and above). I'm trying to decompile the PYC file but it is showing an error as uncompyle6 (or rather,...
user avatar
23 votes
2 answers
48k views

After reading How do I protect Python code? , I decided to try a really simple extension module on Windows. I compiled my own extension module on Linux before, but this is the first time I compiled it ...
yasar's user avatar
  • 13.8k
7 votes
1 answer
10k views

I want to run a Pythonic project using Python compilation (.pyc or __pycache__). In order to do that in Python2, I haven't any problem. Here is a simplified example in a Python2 project: Project tree: ...
Benyamin Jafari's user avatar
18 votes
3 answers
30k views

Python bytecode (.pyc) files have a header that starts with a magic number that changes between Python versions. How can I (programmatically) find out that number for the current Python version in ...
sepp2k's user avatar
  • 372k
9 votes
5 answers
61k views

I did try uncompyle6, decompyle3, and others, but none of them worked with Python 3.10. Is it even possible to do this right now?
Rana's user avatar
  • 101

15 30 50 per page