All the other questions on this forum tell you how to use rust to do something in python, but I want to do the opposite.
I have a function in my main.py script that reads the user's input and stores it. I want to pass that information to a rust file that will then, as a placeholder, print this string. This is my python code:
#creating root window
root = Tk()
#function_definitions
def callback():
text = textEditor.get(0.1,END)
return(text)
#defining text editor
textEditor = Text(root, width=43, height=10)
textEditor.pack()
#button 1
button1 = Button(root, text="Display text", command = callback )
button1.pack(pady=12)
I want to use the output of callback()
in rust. How do I do this?