1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
"""
A client controlling a remote shell.
"""
# Enthought library imports
from enthought.traits.api import implements
# Local imports
from enthought.plugins.remote_editor.communication.client import Client
from i_remote_shell import IRemoteShell
class RemoteShellController(Client):
""" A Client used to control a remote shell.
"""
implements(IRemoteShell)
#------------------------------------------------------
# Client interface
#------------------------------------------------------
self_type = "python_editor"
other_type = "python_shell"
#------------------------------------------------------
# RemoteShell interface
#------------------------------------------------------
def run_file(self, path):
self.send_command('run_file', path)
def run_text(self, text):
self.send_command('run_text', text)
|