@termineter.cmd.command('<STR_LIT>')<EOL><INDENT>def do_ipy(self, args):<DEDENT>
import c1218.data<EOL>import c1219.data<EOL>from c1219.access.general import C1219GeneralAccess<EOL>from c1219.access.security import C1219SecurityAccess<EOL>from c1219.access.log import C1219LogAccess<EOL>from c1219.access.telephone import C1219TelephoneAccess<EOL>vars = {<EOL>'<STR_LIT>': termineter.__version__,<EOL>'<STR_LIT>': c1218.data.C1218Packet,<EOL>'<STR_LIT>': c1218.data.C1218ReadRequest,<EOL>'<STR_LIT>': c1218.data.C1218WriteRequest,<EOL>'<STR_LIT>': c1219.data.C1219ProcedureInit,<EOL>'<STR_LIT>': C1219GeneralAccess,<EOL>'<STR_LIT>': C1219SecurityAccess,<EOL>'<STR_LIT>': C1219LogAccess,<EOL>'<STR_LIT>': C1219TelephoneAccess,<EOL>'<STR_LIT>': self.frmwk,<EOL>'<STR_LIT>': os,<EOL>'<STR_LIT>': sys<EOL>}<EOL>banner = '<STR_LIT>' + sys.version + '<STR_LIT>' + sys.platform + os.linesep<EOL>banner += os.linesep<EOL>banner += '<STR_LIT>'<EOL>if self.frmwk.is_serial_connected():<EOL><INDENT>vars['<STR_LIT>'] = self.frmwk.serial_connection<EOL>banner += os.linesep<EOL>banner += '<STR_LIT>'<EOL><DEDENT>try:<EOL><INDENT>import IPython.terminal.embed<EOL><DEDENT>except ImportError:<EOL><INDENT>pyconsole = code.InteractiveConsole(vars)<EOL>savestdin = os.dup(sys.stdin.fileno())<EOL>savestdout = os.dup(sys.stdout.fileno())<EOL>savestderr = os.dup(sys.stderr.fileno())<EOL>try:<EOL><INDENT>pyconsole.interact(banner)<EOL><DEDENT>except SystemExit:<EOL><INDENT>sys.stdin = os.fdopen(savestdin, '<STR_LIT:r>', <NUM_LIT:0>)<EOL>sys.stdout = os.fdopen(savestdout, '<STR_LIT:w>', <NUM_LIT:0>)<EOL>sys.stderr = os.fdopen(savestderr, '<STR_LIT:w>', <NUM_LIT:0>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.print_line(banner)<EOL>pyconsole = IPython.terminal.embed.InteractiveShellEmbed(<EOL>ipython_dir=os.path.join(self.frmwk.directories.user_data, '<STR_LIT>')<EOL>)<EOL>pyconsole.mainloop(vars)<EOL><DEDENT>
Start an interactive Python interpreter