This is my code with some bits removed, this sends output to a "Notes.txt" textfile but it normally just sends a decimal point followed by random decimal digits. Hopefully a beginner mistake. Code snippets below:
class Window (Frame):
def __init__(self, master = None):
Frame.__init__(self, master)
self.master = master
self.init_window()
def init_window (self):#This sets up the 'Window Frame'
self.master.title("'Joe Banks' - Witty name to follow")
self.pack(fill=BOTH, expand=1)
#Irrelevant File Menus and buttons removed
#Adds Textbox for typing Notes etc.
blankTextbox = Text(app, width = 30, height=4, font=("CenturyGothic",18))
blankTextbox.place(x=270, y=550, anchor="c")
Then in a different procedure:
def saveTextboxToFile(self):
fileContent = str(Text(app, width = 30, height=4, font=("CenturyGothic",18)))
file = open("Notes.txt", "w")
file.write(fileContent)
file.close()