[Tutor] html and python

Benno Lang transmogribenno at gmail.com
Thu Feb 11 01:28:48 CET 2010

On Thu, Feb 11, 2010 at 5:26 AM, Grigor Kolev <grigor.kolev at gmail.com> wrote:
> I apologize to my question is incorrectly set.
> We have a mail list and we want to do in site a list of all participants
> with their photos and names.
> List with people is saved in the txt file.
> I want to open this file. Take all mail address and to do formating the
> data.
> Then with loop to do parsing all data and to do send in the html.
> I can open and save as plain text document.
> File = file(r'/home/user/test.html', 'w')
> But if I refresh the data every day it by a  slowly.

If you can call scripts when actions occur on the mailing list (e.g.
new subscriber added, user unsubscribes, user details updated, etc),
then you could write a Python script to generate static HTML at that
point. It would probably be less hassle than creating a dynamic web

So then all you have to do is loop through your records and write the
resultant HTML to a file that the web server can read.


More information about the Tutor mailing list