Copy a table.

    It is the same as :func:`table.copy`, but without the need to open
    the table first.
770634
def tablecopy(tablename, newtablename, deep=False, valuecopy=False, dminfo={},
              endian='aipsrc', memorytable=False, copynorows=False):
    
    t = table(tablename, ack=False)
    return t.copy(newtablename, deep=deep, valuecopy=valuecopy,
                  dminfo=dminfo, endian=endian, memorytable=memorytable,
                  copynorows=copynorows)
324567
def _SetTable(self, table):
    """"""
    if not isinstance(table, TextTable):
      raise TypeError('Not an instance of TextTable.')
    self.Reset()
    self._table = copy.deepcopy(table._table)   # pylint: disable=W0212
    # Point parent table of each row back ourselves.
    for row in self:
      row.table = self
885148
def copy(self):
        """"""
        new_dict = IDict(std=self._std)
        new_dict.update(self.store)
        return new_dict
16708
def _copy(self):
        """"""
        s_copy = self.__class__()
        s_copy._setbytes_unsafe(self._datastore.getbyteslice(0, self._datastore.bytelength),
                                self.len, self._offset)
        return s_copy
433080
def copy(self, key):
        
        copy = List(key, self.db)
        copy.clear()
        copy.extend(self)
        return copy
485535
def copy(self):
        """"""
        # This way of initializing the copy means it works for subclasses, too.
        obj = self.__class__(self)
        obj.keyOrder = self.keyOrder[:]
        return obj
1046983
def copy(self):
        """"""
        return self._fromset(set(self._set), key=self._key)
267307
def copy(self):
        
        options = {
            'op': self.__op,
            'caseSensitive': self.__caseSensitive,
            'value': copy.copy(self.__value),
            'inverted': self.__inverted,
            'functions': copy.copy(self.__functions),
            'math': copy.copy(self.__math)
        }
        return orb.Query(self.__model, self.__column, **options)
724840
def copy(self):
        
        copyClass = self.copyClass
        if copyClass is None:
            copyClass = self.__class__
        copied = copyClass()
        copied.copyData(self)
        return copied
1255531
def _copy(self):
        
        table = {}
        for existingState, existingOutputs in self.table.items():
            table[existingState] = {}
            for (existingInput, existingTransition) in existingOutputs.items():
                table[existingState][existingInput] = existingTransition
        return TransitionTable(table)
836870
def copy_and_update(dictionary, update):
    """"""
    newdict = dictionary.copy()
    newdict.update(update)
    return newdict
160853
def setTable( self, table ):
        
        self._table = table
        self.setEnabled(table is not None)
        self.clear()
97178
def copy(
            self,
            name,
            start_codons=None,
            stop_codons=None,
            codon_table=None,
            codon_table_changes=None):
        
        new_start_codons = (
            self.start_codons.copy()
            if start_codons is None
            else start_codons)

        new_stop_codons = (
            self.stop_codons.copy()
            if stop_codons is None
            else stop_codons)

        new_codon_table = (
            self.codon_table.copy()
            if codon_table is None
            else codon_table)

        if codon_table_changes is not None:
            new_codon_table.update(codon_table_changes)

        return GeneticCode(
            name=name,
            start_codons=new_start_codons,
            stop_codons=new_stop_codons,
            codon_table=new_codon_table)
817776
def copy(self):
        
        return self.__class__(self.x, self.y, *self._args, **self._kwargs)
947576
def copy(src, trg, transform=None):
    ''' 
    '''
    source = open(src[0], src[1])
    target = open(trg[0], trg[1], autocommit=1000)

    for item in source.get():
        item = dict(item)
        if '_id' in item:
            del item['_id']

        if transform:
            item = transform(item)
        target.put(trg[0](item))

    source.close()
    target.commit()
    target.close()
985232
def copy(self):
        """"""
        args = []
        for arg in self.args:
            if isinstance(arg, Block):
                arg = arg.copy()
            elif isinstance(arg, list):
                arg = [b.copy() for b in arg]
            args.append(arg)
        return Block(self.type, *args)
1265680
def copy(self):
        """"""
        missing = object()
        result = object.__new__(self.__class__)
        for name in self.__slots__:
            val = getattr(self, name, missing)
            if val is not missing:
                setattr(result, name, val)
        return result