Suppose you had a file called create.py like
def square (num)
return num ** 2
Another file in the same directory called input.py
from . import create
def take_input():
x = input("Enter Input")
return create.square(x)
And finally your main.py
from . import input
if __name__ == '__main__':
ip = input.take_input()
You will call the command -
pyinstaller --onefile main.py
And pyinstaller will import all the dependencies of all the files itself
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…