I have GUI Tkinter code as aGUI.py :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import os from tkinter import * from tkinter import ttk root = Tk() root.title( "APP" ) scripte = ttk.Button(root, text = "Run" ) scripte.grid(row = 3 , column = 2 , columnspan = 2 , padx = 20 , pady = 20 ) db = 6 #this varaible export to script called a.py def runApp(): print ( 'app running' ) scripte.config(command = runApp) root.mainloop() |
script code as a.py
1 2 3 4 5 |
from aGUI import db number = db print (number) |
![[Image: jgIdx.png]](https://i.stack.imgur.com/jgIdx.png)
--------------
After Run a.py the app from aGUI.py opened why?
![[Image: C1BW5.png]](https://i.stack.imgur.com/C1BW5.png)
Any suggested.