I Have created 2 scripts.
1.rec.py
uses tkinter
to enter user input
2.classify.py
uses input from rec.py
to perform transformations
What I want to achieve:
call user input from
rec.py
and make it a variable inclassify.py
use variable to perform tranformations in
classify.py
print output of
classify.py
What i did:
rec.py
:
def click(text_user_example):
text_user = text_user_example
os.system("classify.py")
#create a text entry box
text_user = Entry(window, width=20, bg="white")
text_user.grid(row=2, column=0, sticky=W)
#add a submit button
Button(window, text="SUBMIT", width=6, command = lambda:
click(text_user)).grid(row=3, column=0, sticky=W)
classify.py
:
from rec import text_user #this is the only variable i want from "rec.py"
--other tranformations using text_user
print(text_user)
Unfortunately, every time i run classify.py
the tkinter
interface pops up even after i have submitted my input(the interface should not pop up after text-user has been entered).
What am i doing wrong?