Python Forum
Entry in textdocument
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Entry in textdocument
#6
(Sep-10-2019, 10:42 PM)Axel_Erfurt Wrote: To append data to an existing file use open("filename", "a")

Not working. Now my def animalcheck(): looks like this:

def animalcheck():
        animalcheck = Animalcheck.get()
        saveanimal = open("newanimal.txt", "a")
        savenanimal.append(namecheck)
        saveanimal.close()
This is the Error, I get:

AttributeError: '_io.TextIOWrapper' object has no attribute 'append'
Reply


Messages In This Thread
Entry in textdocument - by Piethon - Sep-10-2019, 02:36 PM
RE: Entry in textdocument - by Denni - Sep-10-2019, 03:53 PM
RE: Entry in textdocument - by Piethon - Sep-10-2019, 04:23 PM
RE: Entry in textdocument - by Denni - Sep-10-2019, 08:56 PM
RE: Entry in textdocument - by Axel_Erfurt - Sep-10-2019, 10:42 PM
RE: Entry in textdocument - by Piethon - Sep-11-2019, 05:46 PM
RE: Entry in textdocument - by jefsummers - Sep-11-2019, 06:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Transfer Toplevel window entry to root window entry with TKinter HBH 0 4,420 Jan-23-2020, 09:00 PM
Last Post: HBH
  [Tkinter] how to get the entry information using Entry.get() ? SamyPyth 2 3,451 Mar-18-2019, 05:36 PM
Last Post: woooee

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020