Write a copy of this config object.

        Parameters:
        -----------
        outfile : output filename
        
        Returns:
        --------
        None

def write(self, filename):
        """
        Write a copy of this config object.

        Parameters:
        -----------
        outfile : output filename
        
        Returns:
        --------
        None
        """
        ext = os.path.splitext(filename)[1]
        writer = open(filename, 'w')
        if ext == '.py':
            writer.write(pprint.pformat(self))
        elif ext == '.yaml':
            writer.write(yaml.dump(self))
        else:
            writer.close()
            raise Exception('Unrecognized config format: %s'%ext)
        writer.close()