def errdev(op, lenout, device):
lenout = ctypes.c_int(lenout)<EOL>op = stypes.stringToCharP(op)<EOL>device = ctypes.create_string_buffer(str.encode(device), lenout.value)<EOL>deviceptr = ctypes.c_char_p(ctypes.addressof(device))<EOL>libspice.errdev_c(op, lenout, deviceptr)<EOL>return stypes.toPythonString(deviceptr)<EOL>
Retrieve or set the name of the current output device for error messages.

http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdev_c.html

:param op: The operation, "GET" or "SET".
:type op: str
:param lenout: Length of device for output.
:type lenout: int
:param device: The device name.
:type device: str
:return: The device name.
:rtype: str