'How to call function of main code in an Imported module?
Can an imported module make the Main module call a function? I created a sequence diagram and I have a barebones code example of what I mean:
main:
import test2
def function():
do sth
test2:
import tkinter as tk
window = tk.Tk()
test = tk.Button(master = window, text = "hdsd", command = # call function of main program)
test.grid(row = 0, column = 0)
window.mainloop()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
