Skip to content

v6nom/pyinstaller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 

Repository files navigation

πŸͺ PyInstaller Guide πŸͺ



This repository explains how to use PyInstaller to convert Python scripts into standalone executables (.exe files).

With PyInstaller, you can secure and distribute your Python programs with ease.



πŸ“€ Example Scripts πŸ“€

Here are some example scripts that demonstrate how PyInstaller works:



hello_world.py

This is a simple Python script that prints "Hello, World!" to the console.


print("Hello, World!")



complex_script.py

This is a more complex script that could include external dependencies and requires additional considerations when converting to an executable.


import sys

def main():
    print(f"Arguments: {sys.argv}")

if __name__ == "__main__":
    main()



πŸ› οΈ How to Convert a Python Script to an Executable πŸ› οΈ



Follow these steps to convert your Python script into an executable:



Navigate to the directory containing your script:


cd path/to/your/script

Run PyInstaller to create the executable:


pyinstaller --onefile hello_world.py



πŸ”’ PyInstaller Settings πŸ”’



--key Setting

The `--key` setting in PyInstaller is used for encryption. It specifies a key to encrypt the content of the bundled executable.



This can be useful if you need to protect the source code or sensitive data.

Example usage:

pyinstaller --onefile --key YOUR_SECRET_KEY your_script.py

In this command, `YOUR_SECRET_KEY` is a string you provide. PyInstaller will use this key to encrypt the content of the executable, making it harder to reverse-engineer.



README.md inspired by https://github.com/billythegoat356/

About

How work pyinstaller

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published