200 questions
0 votes
2 answers
118 views
Any way to prevent pycache from creating pyc files while using VSCode debugger and launch.json?
I am currently working on a Python project using the latest version on VSCode on Ubuntu 24.04. When I run my project without using the debugger python3 -B Main.py I don't get any .pyc files created, ...
0 votes
0 answers
53 views
How to selectively bundle my “src” folder in a PyInstaller onedir build while keeping PySide6 external?
I'm using PyInstaller to package my application into an executable. Due to licensing restrictions, I must dynamically link PySide6, so I’m using the default onedir mode instead of --onefile. My ...
-1 votes
1 answer
208 views
Django compiling to pyc and running server
Ok so i run python -m compileall . However the generated files are in pycache manage.cpython-311.pyc and urls.cpython-311 my issue is when i run python manage.cpython-311.pyc runserver I keep ...
0 votes
0 answers
81 views
I use decompyle3 or uncompyle6 It decompiles my functions that do not start with "get" but if my function starts with "get" it generates an error?
I use decompyle3 or uncompyle6 It decompiles my functions that do not start with "get" but if my function or method starts with "get" it generates an error: def ...
0 votes
0 answers
65 views
How to load a module from a byte sequence without saving it to a file in python version 3.11?
My loader receives part of the program from the server as .pyc files (the files themselves are NOT saving in client pc's filesystem, the byte sequence is stored in a variable). I need to create a ...
0 votes
1 answer
276 views
Is it possible to check for a given python file whether it's pyc file is valid and up to date?
For a project which gets deployed to a RO filesystem I want to also deploy pre-compiled .pyc files for all of the Python source. Thanks to the compileall module this already works, but due to whatever ...
0 votes
0 answers
791 views
Trouble reversing a .pyc file back to its source code
I have an EXE compiled using cx_Freeze, and the answer here pointed me to decompyle3 after getting the .pyc file: https://reverseengineering.stackexchange.com/questions/26257/how-to-reverse-engineer-...
0 votes
0 answers
3k views
How to convert python marshal to original code?
Is there a way to return a code written in the form of a marshal to its original form, I have this code written in marshal syntax: from marshal import loads exec(loads(b'c\x00\...
1 vote
1 answer
93 views
How to make python auto-select right pyc file to execute?
I want to distribute my python script in pyc format(generated by python -OO -m py_compile run.py) For different python versions, I've created run.cpython-36.pyc, run.cpython-38.pyc... Now, if the ...
1 vote
0 answers
157 views
How do I avoid pollution of a .venv folder with files owned by root when running a script with root privileges?
In virtual environment (created with poetry) I'm running a Python script regularly as current user via poetry run ./script.py or .venv/bin/python3 script.py From within this script I need to run ...
2 votes
1 answer
265 views
Why does Python3.11 code construction modify inputted co_code?
I'm trying to create a code object (Python 3.11) with modified co_code to another function, but I notice that the CodeType constructor seems to modify the inputted co_code. For example: import types ...
0 votes
1 answer
207 views
How to tell python to run a .py file when both a .pyc and .py file are present?
I have a project that I have compiled into .pyc files for security, but I want to be able to drop a .py file into my project for debugging purposes as necessary. How can I tell python to use a .py ...
1 vote
1 answer
341 views
PyCharm cannot see my newly compiled .pyc see on import
I'm using PyCharm and I have file foo.py. foo.py has a username and base64 representation of a password inside of it. I'm compiling foo.py so it's no longer readable by human eyes. I'm running a ...
0 votes
1 answer
202 views
Django remove source files and how to running pyc files?
In Django project, I don't share the views.py to client. like to remove views.py source files from Django, only pyc files there. But when i remove source file, it gives me ImportError, it should refer ...
1 vote
0 answers
2k views
How to decompile a exe file made by pyinstaller
a desktop.exe made by pyinstaller. I want to decomplie it. I extracted it with pyinstxtractor.py. and ran desktop.pyc.there are some errors : ModuleNotFoundError: No module named 'xxxx'. I think ...