Py to Pyc Converter
The PyToPyc tool is a utility designed to help you convert Python source files (.py) to compiled Python files (.pyc). Additionally, it generates a loader script for each compiled file, which can be used to execute the compiled code.
Features:
Code Root Folder: Specify the root folder containing the Python files you want to compile.
Export Path: Define the destination folder where the compiled files and loader scripts will be saved.
Select Code: A file selection dialog that allows you to select specific .py files from the specified code root folder. Only .py files and directories are displayed in the dialog.
Edit Loader Template: Opens a text editor where you can customize the template used to generate the loader scripts. The template is saved in the settings for future use.
Convert .py to .pyc: Converts the selected .py files to .pyc files and generates corresponding loader scripts.
Usage:
Set Paths: Enter the paths for the code root folder and the export path.
Select Files: Click the "Select Code" button to open the file selection dialog. Select the .py files you want to convert.
Edit Loader Template (optional): If you need to customize the loader script, click the "Edit Loader Template" button and make your changes in the text editor.
Convert Files: Click the "Convert .py to .pyc" button to compile the selected .py files to .pyc files and create the loader scripts.
Disclaimer :
The tool was build on Python 3.11.8 64bit.
Shared files are .pyc with the main tool and .py file that load the tool. I used the same tool to create this setup.
I recommend keeping the Folder structure as in the .zip file.
Can be build by PyInstaller and Nuitka, it would works fine, but as usually the file is falsely reported as a virus. No idea how to go around that as the code only copy files ( the created .pyc file ) and save data to .json file in order to save custom loader code and save path for future start.
Credits:
Created by: Michal Navrátil
ArtStation: https://www.artstation.com/michalnavratilBuy Me a Coffee: https://www.buymeacoffee.com/ezsonix
You will get .py file as loader for the .pyc file. Please try keep the folder structure in order for the tool to work.