Pyload: [Question] .pyc vs. .py files

Created on 12 Dec 2016  路  3Comments  路  Source: pyload/pyload

Hi, I wanted to try and apply an existing Bugfix to my server.
But I discovered that for each .py-file there is a compiled .pyc file.
When/How often are these compiled? Is it sensible to change a .py file, or will the changes just be ignored, because there already is a compiled file?

Does anyone know this off the bat? I'm hesistant to read deep into the project, because when 0.5 arrives, all effort in the old codebase could be obsolete.

question

All 3 comments

From my experience :
1/ alter a .py file
2/ restart pyload
all the required .pyc files will be recompiled if necessary (no need to delete a .pyc)

you have to look carefully to the __version__ property

for info : after stoping pyLoad, you can clear (remove pyc and pyo files) by the command
pyLoadCord --clean

Extract from the manpage
`# pyLoadCore --help

pyLoad v0.4.9 2008-2011 the pyLoad Team
Usage: pyLoadCore [options]

-v, --version Print version to terminal
-c, --clear Delete all saved packages/links
....
--clean Remove .pyc/.pyo files
...`

One more thing to add to @zephura's answer:
if you start pyLoad in debug mode (pyLoadCore -d) it should detect changes to the .py

Thank you two.
It never dawned upon me that there could be a "--help" param or compilation management ( I guess this isn't done by the Python interpreter, but by PyLoad?).
But then I remembered that there is a lot of functionality (CLI, GUI Client, App, ...) and PyLoad is a big project. :-)

Was this page helpful?
0 / 5 - 0 ratings