106 |
self.SetFilename(filename) |
self.SetFilename(filename) |
107 |
|
|
108 |
def Add(self, proj): |
def Add(self, proj): |
109 |
"""Add the given projection to the end of the file. If 'proj' |
"""Add the projection to the end of the file.""" |
110 |
already exists, it is replaced in the same location as the |
self.__projs.append(proj) |
|
original projection. |
|
|
""" |
|
|
|
|
|
try: |
|
|
# |
|
|
# see if the projection already exists. |
|
|
# this only works if Projection doesn't override __eq__ |
|
|
# |
|
|
self.__projs[self.__projs.index(proj)] = proj |
|
|
except ValueError: |
|
|
self.__projs.append(proj) |
|
111 |
|
|
112 |
def Remove(self, proj): |
def Remove(self, proj): |
113 |
"""Remove the object proj from the projection file. |
"""Remove the object proj from the projection file. |