admin管理员组

文章数量:1122832

I am once again back to the place of a .py file that works, and I can even open it in Launcher. The window opens for a file to be selected, select file and the 3D graph plot appears, and all tools for viewing work, and the image can be saved.

The window for choosing a file doesn't close.

As I am just wanting to run the script- is there a way to just run the shell and editor windows in the background?

and close the selection window?

Here is the relevant code for the file selection and reading:

import  tkinter as tk
from tkinter import filedialog
root = tk.Tk()
root.withdraw()
file_path = filedialog.askopenfilename()
print(file_path)

df = pd.read_excel(file_path)
print(df.head)
print(df.columns)

Thank you

本文标签: python 3xpy ran using Launcher How to close shell and editor windowsStack Overflow