pygame /

Diff from to

         newsetup.write(d.line + '\n')
     lines = origsetup.readlines()
-    lines.extend(additional_lines)
+    # overwrite lines which already exist with new ones.
+    new_lines = []
+    for l in lines:
+        addit = 1
+        parts = l.split()
+        for al in additional_lines:
+            aparts = al.split()
+            if aparts and parts:
+                if aparts[0] == parts[0]:
+                    #print ('the same!' + repr(aparts) + repr(parts))
+                    #the same, we should not add the old one.  
+                    #It will be overwritten by the new one.
+                    addit = 0
+        if addit:
+            new_lines.append(l)
+    new_lines.extend(additional_lines)
+    lines = new_lines
     for line in lines:
         useit = 1
         if not line.startswith('COPYLIB'):
     elif sys.platform == 'darwin':
         print_('Using Darwin configuration...\n')
         import config_darwin as CFG
-        additional_platform_setup = file("", "r").readlines()
+        additional_platform_setup = open("", "r").readlines()
         print_('Using UNIX configuration...\n')
         import config_unix as CFG
Tip: Use camelCasing e.g. ProjME to search for