cx#u冻结不';t在使用子进程运行其他python脚本的python脚本上创建.exe文件
我试图冻结一个python程序,它只是一个菜单,可以选择运行其他python脚本。我正在使用子进程运行主程序(菜单)中的每个脚本选项。程序本身运行良好,但当我尝试使用cx_freeze创建可执行文件时,创建过程似乎被中断,生成的.exe文件不运行任何子进程。我曾尝试使用其他方法调用所选的python脚本,如os和call,但无法让它们正常工作。请帮助我,这样我就可以得到一个工作的.exe文件。这是使用子流程的主脚本的一部分:cx#u冻结不';t在使用子进程运行其他python脚本的python脚本上创建.exe文件,python,python-3.x,cx-freeze,Python,Python 3.x,Cx Freeze,我试图冻结一个python程序,它只是一个菜单,可以选择运行其他python脚本。我正在使用子进程运行主程序(菜单)中的每个脚本选项。程序本身运行良好,但当我尝试使用cx_freeze创建可执行文件时,创建过程似乎被中断,生成的.exe文件不运行任何子进程。我曾尝试使用其他方法调用所选的python脚本,如os和call,但无法让它们正常工作。请帮助我,这样我就可以得到一个工作的.exe文件。这是使用子流程的主脚本的一部分: import tkinter as tk from tkinter i
import tkinter as tk
from tkinter import Frame, Button, Label
import subprocess
import sys
import os
class menu(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.grid()
self.mymaster = master
self.widgets()
def widgets(self):
self.menu_container()
self.fill0_frame()
self.title()
self.bottom_frame()
self.play_or_quit())
def menu_container(self):
self.menu_container = tk.Toplevel(self)
...
...
....
def play_or_quit(self):
self.play_or_quit = Frame(self.bottom_frame,width=100,background="grey")
self.play_or_quit.grid(row=2,column=5)
self.button1 = tk.Button(self.play_or_quit, command = import_cw2)
self.button1_name = "childwindow2"
self.button1.configure(text=self.button1_name, background="violet",width=16)
self.button1.grid(row=17,column=10,sticky = "ES")
self.button2 = tk.Button(self.play_or_quit, command = import_cwp4)
self.button2_name = "childwindowprimes4"
self.button2.configure(text=self.button2_name, background="pink",width=16)
self.button2.grid(row=18,column=10,sticky = "ES")
self.button3 = Button(self.play_or_quit, command = import_TSF) #height=1,width=2)
self.button3_name = "The Seiji Factor"
self.button3.configure(text=self.button3_name, background="tan",width=16)
self.button3.grid(row=19,column=10,sticky = "ES")
self.button4 = Button(self.play_or_quit, command = self.finished, height=1,width=2)
self.button4_name = "Quit"
self.button4.configure(text=self.button4_name, background="red",width=16)
self.button4.grid(row=20,column=10,sticky= "ES")
...
def import_cw2(): #,event
theproc = subprocess.Popen([sys.executable, "cw2gameframes.py"])
theproc.communicate()
def import_cwp4():
theproc2 = subprocess.Popen([sys.executable, "cwp4gameframes.py"])
theproc2.communicate()
def import_TSF():
theproc = subprocess.Popen([sys.executable, "SeijiFactorgameframes.py"])
theproc.communicate()
if __name__=='__main__':
root = tk.Tk()
root.withdraw()
application = menu(root)
root.mainloop()