def createDestination(self, dstFile=None, import_lines=None):
        if dstFile is None:
            dstFile = self.dstFile
        if import_lines is None:
            import_lines = self.import_lines
        try:
            oldData = open(dstFile, 'r').readlines()
        except __HOLE__, e:
            if e[0] == 2: # No such file or directory
                oldData = []
            else:
                raise
        newData = []
        if len(import_lines) > 2:
            for line in import_lines:
                newData.append("%s\n" % line)
        skip = False
        for line in oldData:
            sline = line.rstrip()
            if skip:
                if sline == ')':
                    skip = False
                continue
            if sline == import_lines[0]:
                skip = True
                continue
            newData.append(line)
        newData = "".join(newData)
        open(dstFile, 'w').write(newData)
dataset/ETHPy150Open anandology/pyjamas/contrib/create_imports.py/CreateImports.createDestination