Exemplo n.º 1
0
    def do_int(self, arg):
	# XXX We should really stop other tasks while we use changed stdio files
	# but that seems to be hard to do
	# so this is ok for some practical purposes.
	# --- new note May 8 2005:
	# --- and doesn't matter since we are in a different interpreter -
	# --- so there is no XXX issue ?
	ostdin = sys.stdin
	ostdout = sys.stdout
	ostderr = sys.stderr
	
	try:
            sys.stdin = self.stdin
	    sys.stdout = self.stdout
	    sys.stderr = self.stdout

            con = Console(stdin=sys.stdin,stdout=sys.stdout,
				       locals=self.intlocals)
            con.interact(
                "Remote interactive console. To return to Annex, type %r."%
                con.EOF_key_sequence)



	finally:
	    sys.stdin = ostdin
	    sys.stdout = ostdout
	    sys.stderr = ostderr
Exemplo n.º 2
0
    def do_int(self, arg):
        # XXX We should really stop other tasks while we use changed stdio files
        # but that seems to be hard to do
        # so this is ok for some practical purposes.
        # --- new note May 8 2005:
        # --- and doesn't matter since we are in a different interpreter -
        # --- so there is no XXX issue ?
        ostdin = sys.stdin
        ostdout = sys.stdout
        ostderr = sys.stderr

        try:
            sys.stdin = self.stdin
            sys.stdout = self.stdout
            sys.stderr = self.stdout

            con = Console(stdin=sys.stdin,
                          stdout=sys.stdout,
                          locals=self.intlocals)
            con.interact(
                "Remote interactive console. To return to Annex, type %r." %
                con.EOF_key_sequence)

        finally:
            sys.stdin = ostdin
            sys.stdout = ostdout
            sys.stderr = ostderr
Exemplo n.º 3
0
    def do_int(self, arg):
	try:
	    con = Console(stdin=self.stdin,stdout=self.stdout,
				       locals=self.__dict__)
	    con.interact(
                "Local interactive console. To return to Monitor, type %r."%
                         con.EOF_key_sequence)

	finally:
	    pass