このフォーラムの他のすべての質問は、錆を使用して Python で何かを行う方法を教えてくれますが、私は反対のことをしたいと考えています。
main.py スクリプトに、ユーザーの入力を読み取って保存する関数があります。その情報をrustファイルに渡し、プレースホルダーとしてこの文字列を出力したいと考えています。これは私のpythonコードです:
#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)
in ruby の出力を使いたいcallback()
。どうすればいいですか?