Extract lines from file, add to new files

Jon Ribbens jon+usenet at unequivocal.eu
Tue Jan 30 09:03:39 EST 2024


On 2024-01-30, Rich Shepard <rshepard at appl-ecosys.com> 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.

lol good luck with that.


More information about the Python-list mailing list