Python pyinstaller

Asked 2 years ago, Updated 2 years ago, 14 views

Using the pyinstaller.I want to make a py file as an executable, but I want to make an executable file by putting the file I made in the import module. What should I do? For example,

# ---- myprogram.py

def aaa():
    ....

# # ---newFile program.py

import myprogram.py

myprogram.aaa("abc") 

Like this, it's.I want to make py an executable file, but I also want to import myprogram.py. What should I do?

python

2022-09-22 10:17

1 Answers

# program.py
import myprogram

myprogram.aaa("abc")

program with pyinstaller.You can create a py file as an executable. And if you run the executable file, it will output abc, but if you don't run it in the cmd window, it will end right away, so I think you can add input() at the bottom of the code.


2022-09-22 10:17

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.