Bdist_mac cx_freeze with tkinter and selenium interaction

I created a python 3 application with tkinter GUI and selenium when a button is clicked. Here is the setup.py file:

from cx_Freeze import setup, Executable import sys import os from pathlib import Path buildOptions = {"include_files":['execute.py'], "packages": ['encodings'], "includes": ['numpy.core._methods', 'numpy.lib.format'], "excludes": []} if sys.platform=='win32': base = "Win32GUI" else: base=None executables = [ Executable('bot_gui.py', base=base) ] home_path = str(Path.home()) user_txt_path = [] if sys.platform=='win32': print("windows detected") user_txt_path.append('\\user.txt') else: print("macos detected") user_txt_path.append('/user.txt') #for initialization f = open(home_path + user_txt_path[0], "w+") for i in range(12): f.write("---\n") setup(name='tachysloth', version = '1.0', description = 'test', options = dict(build_exe = buildOptions), executables = executables) 

The problem is that I run python setup.py build , everything works fine; but when I run python setup.py bdist_mac , the GUI works when you click on the application (called tachysloth-1.0 below)

enter image description here

but when I press a button in the GUI to open google.com in Chrome, the button does nothing.

If you need more information to evaluate this problem, let me know and I will provide this information as soon as possible.

Thanks again.

+5
source share

Source: https://habr.com/ru/post/1274567/


All Articles