Print event handler
766888
def OnPrint(self, event):
        """"""

        print_area = self._get_print_area()
        print_data = self.main_window.print_data

        self.main_window.actions.printout(print_area, print_data)
339323
def printif(self, obj_print, tipo_print=None):
        """"""
        if self.verbose:
            print(obj_print)
        if tipo_print == 'ok':
            logging.info(obj_print)
        elif tipo_print == 'error':
            logging.error(obj_print)
        elif tipo_print == 'warning':
            logging.warning(obj_print)
430018
function print(object) {
    console.log(util.inspect(object, null, null, true));
}
375995
public void printDataEndForm(PrintWriter out, int iPrintOptions)
    {
        out.println("</tr>\n</table>");
        if ((iPrintOptions & HtmlConstants.DETAIL_SCREEN) != 0)
            out.println("</td>\n</tr>");
    }
880279
def printOut(value, end='\n'):
    
    sys.stdout.write(value)
    sys.stdout.write(end)
    sys.stdout.flush()
631519
def print(self, indent=0):
        """"""
        LOG.info("%s:: %s", indent * " ", self.__class__)
        for ext in self.next_extensions:
            ext.print(indent=indent + 2)
462903
def handle_events(self):
        
        for event in sys.stdin:
            if event.startswith('['):
                continue
            name = json.loads(event.lstrip(','))['name']
            for obj in self.loader.objects:
                if obj.output_options['name'] == name:
                    obj.on_click(json.loads(event.lstrip(',')))
1152439
def on_event(event_handler = nil, &block)
      event_handler ||= block
      raise ArgumentError, "no event_handler provided" if event_handler.nil?
      @event_handler = event_handler
    end
1255313
function( editor ) {
		// Print plugin isn't available in inline mode yet.
		if ( editor.elementMode == CKEDITOR.ELEMENT_MODE_INLINE )
			return;

		var pluginName = 'print';

		// Register the command.
		var command = editor.addCommand( pluginName, CKEDITOR.plugins.print );

		// Register the toolbar button.
		editor.ui.addButton && editor.ui.addButton( 'Print', {
			label: editor.lang.print.toolbar,
			command: pluginName,
			toolbar: 'document,50'
		} );
	}
1284203
function printWarning(context, kind, err)
{
	if (context !== null) {
		console.error('warn: %s: %s', context.label(), err.message);
	} else {
		console.error('warn: %s', err.message);
	}
}
1203518
def on_print(self, node):    # ('dest', 'values', 'nl')
        
        dest = self.run(node.dest) or self.writer
        end = ''
        if node.nl:
            end = '\n'
        out = [self.run(tnode) for tnode in node.values]
        if out and len(self.error) == 0:
            self._printer(*out, file=dest, end=end)
225541
def print_markers(f):
    
    @click.pass_context
    def new_func(ctx, *args, **kwargs):
        command = ctx.info_name
        assert command is not None
        command_name = ctx.command_path
        click_extensions.echo_with_markers(command_name, marker_color='green')

        def print_error(code):
            click_extensions.echo_with_markers('end of {} (exit code: {code})'.format(
                command_name, code=code), marker_color='red')

        def print_success():
            click_extensions.echo_with_markers('end of {}'.format(
                command_name), marker_color='green')
        try:
            ctx.invoke(f, *args, **kwargs)
        except SystemExit as e:
            code = e.code if e.code is not None else exit_codes.ABORT
            if code == 0:
                print_success()
            else:
                print_error(code)
            raise
        except click.ClickException as e:
            code = e.exit_code
            if code == 0:
                print_success()
            else:
                print_error(code)
            raise
        except click.Abort as e:
            code = exit_codes.ABORT
            print_error(code)
            raise
        except Exception as e:
            code = -1
            print_error(code)
            raise
        else:
            print_success()
            return
    return update_wrapper(new_func, f)
792688
def mouseGestureHandler(self, info):
        
        print(self.pre, ": mouseGestureHandler: ")
        # *** single click events ***
        if (info.fsingle):
            print(self.pre, ": mouseGestureHandler: single click")
            if (info.button == QtCore.Qt.LeftButton):
                print(self.pre, ": mouseGestureHandler: Left button clicked")
            elif (info.button == QtCore.Qt.RightButton):
                print(self.pre, ": mouseGestureHandler: Right button clicked")
                self.handle_right_single_click(info)
        # *** double click events ***
        elif (info.fdouble):
            if (info.button == QtCore.Qt.LeftButton):
                print(
                    self.pre,
                    ": mouseGestureHandler: Left button double-clicked")
                self.handle_left_double_click(info)
            elif (info.button == QtCore.Qt.RightButton):
                print(
                    self.pre,
                    ": mouseGestureHandler: Right button double-clicked")
1321503
def printd(*args, **kwargs):
    """"""

    global settings
    if settings['PRINT_DEBUG_STATE']:
        print(*args, **kwargs)
        return True
    return False
13274
public function printScript()
    {
        foreach ($this->scripts as $key => $options) {
            $src = (is_string($options['src'])) ? $options['src'] : $this->getScriptLink($key);
            if ($options['with_version']) {
                $src = call_user_func_array($this->assetInsertMethod, [$src, $this->assetVersion]);
            }
            echo "<script type='text/javascript' src='$src'></script>\n";
        }
        $this->printInlineScript();
    }
845743
def on_button(callback, args=(), buttons=(LEFT, MIDDLE, RIGHT, X, X2), types=(UP, DOWN, DOUBLE)):
    
    if not isinstance(buttons, (tuple, list)):
        buttons = (buttons,)
    if not isinstance(types, (tuple, list)):
        types = (types,)

    def handler(event):
        if isinstance(event, ButtonEvent):
            if event.event_type in types and event.button in buttons:
                callback(*args)
    _listener.add_handler(handler)
    return handler
856273
static void capturePageEvent(String eventName, final EventHandler handler) {
    HtmlPlatform.captureEvent(eventName, new EventHandler() {
      @Override
      public void handleEvent(NativeEvent evt) {
        handler.handleEvent(evt);
      }
    });
  }