def MoveSegm(ea, to, flags):
    seg = idaapi.getseg(ea)
    if not seg:
        return MOVE_SEGM_PARAM
    return idaapi.move_segm(seg, to, flags)
Move a segment to a new address
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/MoveSegm