Skip to content

Advanced

MrBooks36 edited this page Oct 25, 2025 · 5 revisions

PyCompyle Advanced Commands Internal Reference

This is a list of more technical notes on args and functions (Can contain code or features not fully released yet)


General Format

python -m PyCompyle [options] source_file.py

General Notes

argparse is used for parsing arguments

Command List Template

-nc, --noconfirm

if not args.noconfirm:
        getpass('Press Enter to continue building the EXE') 
makexe.main(folder_path, args)

When this flag is specified it will skip the confirmation of moving onto the second phase.
Getpass it used go if the user bumps there keyboard it will not show up.


-f, --folder

When this flag is specified the compiler will remove the .build suffix from the build folder and point all operations to the new folder.


-zip, --zip

The compiler will compress the folder into a .zip file before cleanup.
Will automatically imply the --folder flag.


-bat, --bat

The compiler will create a .bat file with the name of the original script (e.g. test.py) this this code:

@echo off
%~dp0\python.exe %~dp0\__main__.py

Will automatically imply the --folder flag.


-i, --icon

The compiler will download ResourceHacker and use it to add the icon to the executable


-p, --package

When this flag is passed the import wrapping system will append the listed packages to the temp_script.py that checks for imports with:

str([m.__name__ for m in sys.modules.values() if m])

-v, --verbose

The program will setup logging with the logging level of debug.
Pretty simple.


-w, --windowed

The compiler will use the pre-made windowed bootloader instead of the normal bootloader (Compatible with --uac)


-k, --keepfiles

The program will skip the cleanup of files.
Pretty simple.


-d, --debug

Enables all debugging tools: --verbose --keepfiles --folder and disables --windowed and --zip

if args.debug:
 args.verbose = True
 args.keepfiles = True
 args.folder = True
 args.zip = False
 args.windowed = False

-c, --copy

This will copy items excluding pycache, .git, .github, .gitignore, readme*, licence*, .vscode Pretty simple.


-uac, --uac

The compiler will use the pre-made uac bootloader instead of the normal bootloader. (Compatible with --windowed)


--force-refresh

Deletes %localappdata%/PyCompyle.cache Pretty simple.


--disable-compressing

Skips UPX binary compression and top level PY compression


--disable-password

Does not use a password in the zipping phase of building the onefilexe Pretty simple.