Python Forum
Text file not being created
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text file not being created
#2
That looks nice. But what is your question? What is going wrong?
Indeed the data is stored in a dictionary with the name "emails". When you end the program this dictionary should be saved to a file with pickle and when you start it again the data should be read from this file.
I see only two problems.
The first time you start the program there will be no file. So the file has to be created with an empty dictionary.
Then in main() you call the function load_emails() which is defined later. Perhaps you should put main() near the end of the program.
Reply


Messages In This Thread
Text file not being created - by poochenthecreator - Mar-05-2020, 11:34 PM
RE: Text file not being created - by ibreeden - Mar-06-2020, 01:38 PM
RE: Text file not being created - by AKNL - Mar-07-2020, 02:48 AM
RE: Text file not being created - by perfringo - Mar-07-2020, 12:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Convert text from an image to a text file Evil_Patrick 5 4,430 Jul-30-2019, 07:57 PM
Last Post: DeaD_EyE
  reading text file and writing to an output file precedded by line numbers kannan 7 10,651 Dec-11-2018, 02:19 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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