예제 #1
0
파일: Remote.py 프로젝트: 15580056814/hue
    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
예제 #2
0
파일: Remote.py 프로젝트: yueyub/guppy3
    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
예제 #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