def code_has_errors(self, editor=None):
        code = '\n'.join(self.code(editor)).encode('UTF-8')
        try:
            compile(code, '<filter>', 'exec')
        except SyntaxError as e:
            return e.msg + ' (Line %d)' % (e.lineno)
        return None
Returns if the code from an editor object can be compiled.
dataset/ETHPy150Open rproepp/spykeviewer/spykeviewer/ui/plugin_editor_dock.py/PluginEditorDock.code_has_errors