I have a python script that generates a large text file that needs a specific filename that will FTPd later. After creating the file it copies it to a new location while modifying the date to reflect the date sent. The only problem is that the copied file is missing several of the last lines of the original.
from shutil import copy
// file 1 creation
copy("file1.txt", "backup_folder/file1_date.txt")
What might be causing this? Could the original file not be finished being written to causing the copy to just get what is there?