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
|
"""
A client controlling a remote editor.
"""
# Enthought library imports
from enthought.traits.api import implements
# Local imports
from enthought.plugins.remote_editor.communication.client import Client
from i_remote_editor import IRemoteEditor
class RemoteEditorController(Client):
""" A Client used to control a remote editor.
"""
implements(IRemoteEditor)
# Client interface
self_type = "python_shell"
other_type = "python_editor"
def new_file(self):
self.send_command('new')
def open_file(self, filename):
self.send_command('open', filename)
|