Jul-18-2020, 11:55 PM
I have some home-made Python programs which make html.
A simple example is insertMedia.py: it asks for the name of the media file and inserts the audio or video player html code, with the file name inserted, and appends it to my output text file, all in its own <div
This works great in tkinter, thanks to help from here. Enter the name of the file, click a button 'insert audio' or 'insert video and it's done!
What I want to have is a master window. For each "makehtml" program I will make a button. Click the button "insert media" and insertMedia.py should open and run.
I've seen code to open a new window from a window, like this:
A simple example is insertMedia.py: it asks for the name of the media file and inserts the audio or video player html code, with the file name inserted, and appends it to my output text file, all in its own <div
This works great in tkinter, thanks to help from here. Enter the name of the file, click a button 'insert audio' or 'insert video and it's done!
What I want to have is a master window. For each "makehtml" program I will make a button. Click the button "insert media" and insertMedia.py should open and run.
I've seen code to open a new window from a window, like this:
import Tkinter as tk def create_window(): window = tk.Toplevel(root) root = tk.Tk() b = tk.Button(root, text="Create new window", command=create_window) b.pack() root.mainloop()How can I make insertMedia.py open and run from a master window? What should the command be?