diff --git a/README.md b/README.md index 748c8ab..dbfcca7 100644 --- a/README.md +++ b/README.md @@ -3455,6 +3455,18 @@ cdef enum : , , ... ``` +PyInstaller +----------- +```bash +$ pip3 install pyinstaller +$ pyinstaller script.py # Compiles into './dist/script' directory. +$ pyinstaller script.py --onefile # Compiles into './dist/script' console app. +$ pyinstaller script.py --windowed # Compiles into './dist/script' windowed app. +$ pyinstaller script.py --add-data ':.' # Adds file to the root of the executable. +``` +* **Paths of files have to be changed to `'os.path.join(sys._MEIPASS, "")'`.** + + Basic Script Template --------------------- ```python diff --git a/index.html b/index.html index e99b60d..e1a7a05 100644 --- a/index.html +++ b/index.html @@ -2930,6 +2930,16 @@ cdef <type/void> <func_name>(<type> <arg_name_1>, ...):
cdef enum <enum_name>: <member_name_1>, <member_name_2>, ...
 
+

#PyInstaller

$ pip3 install pyinstaller
+$ pyinstaller script.py                        # Compiles into './dist/script' directory.
+$ pyinstaller script.py --onefile              # Compiles into './dist/script' console app.
+$ pyinstaller script.py --windowed             # Compiles into './dist/script' windowed app.
+$ pyinstaller script.py --add-data '<path>:.'  # Adds file to the root of the executable.
+
+ +
    +
  • Paths of files have to be changed to 'os.path.join(sys._MEIPASS, "<path>")'.
  • +

#Basic Script Template

#!/usr/bin/env python3
 #
 # Usage: .py