Python source code is automatically compiled into Python byte code by the CPython interpreter. Compiled code is usually stored in .pyc files, and is regenerated when the source is updated, or when otherwise necessary.
Questions tagged [pyc]
195 questions
0
votes
1 answer
methods from .pyc file not being read
I have a python file that does something. It calls into methods from a .pyc file as follows.
someFile.py
# do something
from EvaluateT.read_input_data import *
print "imported"
# do something
inputData = ReadInputData(someInputFile)
print…

Chaitra Raghunath
- 57
- 1
- 10
0
votes
0 answers
What directory/path do compiled python (pyc) files need to be in to be found by an import?
I can't find an exact answer for this..
I have a compiled .pyc file. I have a reference to it in another python file. Where does the pyc file need to be for Python to find it? Whenever I run this I get an error saying there is no module found…

Akron
- 1,413
- 2
- 13
- 28
0
votes
0 answers
Deploying .pyc only on embedded linux platform
Is there any contraindication in deploying .pyc only files in and embedded systems running Linux and python 2.7 ?
If I can deploy only .pyc I would avoid having waste of storage in a resource constrained embedded system.

Felipe Lavratti
- 2,887
- 16
- 34
0
votes
1 answer
.pyc files don't get updated (only in Django)
I am running into a problem where any changes I make to my .py Django files don't change the .pyc file, so the Django web site doesn't change until I manually delete the .pyc file.
This only happens when running a Django app/py files dependent on…

Alds
- 65
- 2
- 8
0
votes
1 answer
A curious case of nginx uswgi python
We have a python MVC Web application built using (werkzeug, jinja2 and MongoEngine).
In production we have 4 nginx servers setup behind a nginx load balancer. All 4 servers share a common Mongo server, a Redis server and a Sphinx server.We are using…

Jibin
- 3,054
- 7
- 36
- 51
0
votes
0 answers
# Error: line 1: ImportError: file line 1: No module named HZrivet.UI
My code was working well a day ago, but now it throws the following message:
" # Error: line 1: ImportError: file line 1: No module named HZrivet.UI "
This script is on .pyc format, it's a maya script. Also I have no knowledge in scripting.

Kisor Mj
- 1
- 1
0
votes
1 answer
How Python's interpreter prints text ? - The source code
Any Python geeks over here know how Python's interpreter exactly prints the output. I need the exact source file. So far, I found that if Python's interpreter is printing anything it is calling "PyEval_CallObject" or maybe I am wrong. Any pointers…
user2218777
0
votes
1 answer
How do virtual machines render GUI?
So I have been doing a lot of reading about execution environments (Python's, JVM...) and I am starting to implement one on my own. It is a register-based environment written in C. I have a basic byte code format defined and the execution is going…
user2218777
0
votes
1 answer
openerp pyc files not generated
Good morning to everyone, i am facing this problem:
Sometimes, after making modifications in my .py files, i restarted the server and saw nothing had changed. In fact the .pyc files were not regenerated so i want to know if someone can give me the…

levolutionniste
- 424
- 1
- 6
- 16
0
votes
0 answers
Decompyle .pyc failed
From my pyc file I got an error:
>>> from decompile import main
>>> main('','.',['D:\\uiexchange.pyc'])
### Can't decompyle D:\uiexchange.pyc
Traceback (most recent call last):
File "", line 1, in ?
…
0
votes
0 answers
How to have Spyder auto-complete modules only available as compiled .pyc files?
In contrast to pydev, spyder doesn't appear to support code completion for .pyc modules without their sources. Is there a setting I missed, or some way to fix this?

Tobias Kienzler
- 25,759
- 22
- 127
- 221
0
votes
2 answers
How can I create a pyc file from a function?
I'm in a game coded in python, and I can access all modules and their functions.
I wan't to get a .pyc file of some of the larger functions so that I can put it through dePython or something similar. It would be a huge pain to read these functions…
user2430629
-1
votes
1 answer
Python : .pyc Extension Error While Creating
This is a Python module which provides the facilities for the polynomial evaluator. It is really nothing more than a bunch of Python code (mostly function definitions) inside a file. The name of the module is the name of the file, plus the .py…

hakki
- 6,181
- 6
- 62
- 106
-2
votes
1 answer
Decompile *.pyc file
I'm a newcomer to programming, and currently taking a course on MIT OCW, using Python 2.6.
The site provides me with a .pyc file, and I wonder if it can be decompiled back to a .py file.
I have researched some ways on the Internet, such as this: Is…

npvinhphat
- 33
- 1
- 1
- 4
-4
votes
1 answer
How can i convert a Pyc file to Exe?
I need to obfuscate my Python code, I know the best way would be to convert it to a C file but I can't do that.
According to this article, although not 100% effective, I can "obfuscate" the code using:
python -OO -m py_compile
Doing…

Luca Orlandi
- 3
- 2