def _exist(self, name):
cmd = '<STR_LIT>' % name<EOL>resp = self._engine.eval(cmd, silent=True).strip()<EOL>exist = int(resp.split()[-<NUM_LIT:1>])<EOL>if exist == <NUM_LIT:0>:<EOL><INDENT>msg = '<STR_LIT>'<EOL>raise Oct2PyError(msg % name)<EOL><DEDENT>return exist<EOL>
Test whether a name exists and return the name code.

        Raises an error when the name does not exist.