| 103 | options_values[idx] = str(value).encode('utf-8') |
| 104 | |
| 105 | class ErrorMessageCapture(object): |
| 106 | |
| 107 | def __init__(self): |
| 108 | self.message = '' |
| 109 | |
| 110 | def report(self, x): |
| 111 | self.message += x |
| 112 | |
| 113 | capture = ErrorMessageCapture() |
| 114 | error_capturer_cb = ctypes.CFUNCTYPE(None, ctypes.c_char_p)(capture.report) |