Extract lines from file, add to new files

Thomas Passin list1 at tompassin.net
Tue Jan 30 09:07:52 EST 2024


On 1/30/2024 8:37 AM, Rich Shepard via Python-list wrote:
> On Mon, 29 Jan 2024, Thomas Passin via Python-list wrote:
> 
>> If you aren't going to use one or another existing template system,
>> perhaps the easiest is to use unique strings in the message file. For
>> example:
>>
>> Dear __##so-and-so##__:
>>   Please don't write this message off as mere spam.
>>   Respectfully, Rich
>>
>> Then you just do a replace of the unique string by the salutation. Don't
>> change the original (i.e., template), make the changes to a copy that you
>> will output.
> 
> My script is not a web application, but an emailer that allows me to 
> contact
> clients and prospective clients. From the command line on a linux host.
> Using the python smtplib and mail modules.
> 
> Rich

Fine, my toy example will still be applicable.  But, you know, you 
haven't told us enough to give you help.  Do you want to replace text 
from values in a file?  That's been covered. Do you want to send the 
messages using those libraries?  You haven't said what you don't know 
how to do.  Something else? What is it that you want to do that you 
don't know how?



More information about the Python-list mailing list