I've been working with Python and Django for the past week or so and thus far it's been great. My question is more of a general Python question than it is a Django question, but hopefully I can get some help or a link to an appropriate doc/website. So far I've not been able to dig up much useful information up on Google.
The application that I'm working on checks a CVS repository for all active projects and returns a list of the corresponding project names. I'd then like to put these names into a database. We start a few new projects every week, so our CVS repo grows fairly quickly and I'd like to be able to have the database stay current, either with a cron job or by a user starting the processes. So far all that works, but since CVS will always return a full list of projects, and I only want one entry in the database per project, I need to filter out the new projects. Right now I'm just comparing what the CVS return list contains with what is in the database. Here is the code that I use. Output_list is from CVS and current_projects is from the database. Is there a faster way to do this, or a built in method in Python? This code works fine now, but I can see it getting slow. for b in output_list: found = False for i in current_projects: if i.name == b: found = True if not found: new_projects.append(b) Thanks for the help, Alex --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---