tkinterのテキストボックスから、書き込み内容を取得するために.get()を使用しましたが
エラーが出ます。
'str' object has no attribute 'get'
となってしまいます。
文字列を取得する方法を教えていただきたいです。
よろしくお願いします。
python
1memo = filedialog.asksaveasfilename(initialfile="{}.txt".format(datetime.date.today()),initialdir = "C:/python/memo",title = "Save as",filetypes = [("text file","*.txt")]) 2with open(memo, 'w') as f: 3 f.write(memo.get('1.0', 'end-1c'))
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。