Python Forum
Problem with updating file to attach/pynput
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with updating file to attach/pynput
#6
The attachment is sending just fine. Ignore the 20 second delay, I just had that in there for testing purposes.

The problem I'm having is that as the logger logs to the text file, the email will send the attachment but will not send an updated text file because the folder is still open and being written to.

I need a clean way to close the file, and re-open the function to start again after it captures so many characters... or so much time goes by.. etc.
Reply


Messages In This Thread
RE: Problem with updating file to attach/pynput - by jameseroni - Oct-27-2018, 07:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Unexpected output when trying to attach files in a mail application PythonU2Novel 0 1,054 May-17-2024, 02:59 AM
Last Post: PythonU2Novel
  Problem with "from pynput" LFreitas 1 1,597 Mar-24-2024, 02:23 AM
Last Post: deanhystad
  Python openyxl not updating Excel file MrBean12 1 2,146 Mar-03-2024, 12:16 AM
Last Post: MrBean12
  Updating sharepoint excel file odd results cubangt 1 2,108 Nov-03-2023, 05:13 PM
Last Post: noisefloor
  Pynput - One content on screen, another in the variable Valjean 4 4,507 Sep-18-2023, 06:00 PM
Last Post: Valjean
  Pynput Library not Working with Windows jacknewport 1 4,055 Mar-26-2022, 07:09 PM
Last Post: snippsat
  Initializing, reading and updating a large JSON file medatib531 0 2,838 Mar-10-2022, 07:58 PM
Last Post: medatib531
  Updating a config file [solved] ebolisa 8 4,108 Nov-04-2021, 10:20 AM
Last Post: Gribouillis
  Problem updating value in MySQL database dangermaus33 1 2,200 Nov-24-2020, 08:32 PM
Last Post: dangermaus33
  Is it possible to attach to an open existing Browser? tommytx 7 4,599 Apr-27-2020, 12:40 AM
Last Post: tommytx

Forum Jump:

User Panel Messages

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