Answer the question
In order to leave comments, you need to log in
How to compile multiple Python files?
Good day!
I am writing now a simple application on PyQt4, consisting of 3 windows.
From the main window, by pressing the corresponding button, one of the other two windows is called. The code for each window is in different .py files.
When creating an exe via cx_Freeze, only the main window is shown, clicking on the buttons to call other windows does nothing. Examples on the net describe how to make an exe from one script file, but I have 3 of them. How to write setup.py correctly so that the program works correctly?
Python: 3.4
PyQt 4.8.3
Win7 32-bit
If you need to post something else - write. I really want to solve this problem.
Answer the question
In order to leave comments, you need to log in
In principle, I figured out cx_freeze, as always, I needed to read the documentation a little more carefully. It was necessary to add this thing when writing setup.py:
executables = [
Executable('win1.py'),
Executable('win2.py'),
Executable('win3.py')
]
setup(name="name",
version="0.0.1",
description="lalala",
options={"build_exe": build_exe_options},
executables=executables)
executables = [
Executable('win1.py', includes=['win2.py', 'win3.py'])
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question