def GetReg(ea, reg):
    reg = idaapi.str2reg(reg);
    if reg >= 0:
        return idaapi.getSR(ea, reg)
    else:
        return -1
Get value of segment register at the specified address
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/GetReg