コード例 #1
0
class StopInspect(amp.Command):
    """Close an inspect window.
    
    This command may return an error indicating that no such window exists.
    
    """
    arguments = [('inspector_id', amp.Integer())]
    response = []
    errors = {exceptions.WindowDoesNotExistError: 'WINDOW_DOES_NOT_EXIST'}
コード例 #2
0
class PollInspect(amp.Command):
    """Poll an inspect window to see if it's still open.
    
    The result of this command may be invalid as soon as it is given.
    Relying on the return value will result in race conditions.
    
    """
    arguments = [('inspector_id', amp.Integer())]
    response = [('is_closed', amp.Boolean())]
コード例 #3
0
class StartInspect(amp.Command):
    """Start a new inspect window.

    This command returns an inspector handle that may be used to invoke
    further operations on the inspector window.

    """
    arguments = [('img', PILImage()), ('inspectable', amp.Boolean())]
    response = [('inspector_id', amp.Integer())]
コード例 #4
0
class AskColor(_Ask):
    """Amp command for executing tkFileDialog.askcolor"""
    arguments = [("r", amp.Integer()), ("g", amp.Integer()),
                 ("b", amp.Integer())]
    response = arguments  # asks with start color, returns color