Create `Layout` for the exit message.
487970
def exit_confirmation(python_input, style='class:exit-confirmation'):
    
    def get_text_fragments():
        # Show "Do you really want to exit?"
        return [
            (style, '\n %s ([y]/n)' % python_input.exit_message),
            ('[SetCursorPosition]', ''),
            (style, '  \n'),
        ]

    visible = ~is_done & Condition(lambda: python_input.show_exit_confirmation)

    return ConditionalContainer(
        content=Window(FormattedTextControl(get_text_fragments), style=style),   # , has_focus=visible)),
        filter=visible)
521902
def cli(ctx, project_dir):
    """"""

    exit_code = SCons(project_dir).sim()
    ctx.exit(exit_code)
832590
def write_layout(_path):
    

    path.mkdir_uchroot("/etc/portage/metadata")
    path.mkfile_uchroot("/etc/portage/metadata/layout.conf")
    with open(_path, 'w') as layoutconf:
        lines = '''masters = gentoo'''
        layoutconf.write(lines)
332
def cmd_layout(self, args):
        ''''''
        from MAVProxy.modules.lib import win_layout
        if len(args) < 1:
            print("usage: layout <save|load>")
            return
        if args[0] == "load":
            win_layout.load_layout(self.mpstate.settings.vehicle_name)
        elif args[0] == "save":
            win_layout.save_layout(self.mpstate.settings.vehicle_name)
310823
public <T> T exit(T result) {
        if (instanceofLAL && logger.isTraceEnabled(ENTRY_MARKER)) {
            FormattingTuple tp = MessageFormatter.format(EXIT_MESSAGE_1, result);
            ((LocationAwareLogger) logger).log(EXIT_MARKER, FQCN, LocationAwareLogger.TRACE_INT, tp.getMessage(), new Object[] { result }, tp.getThrowable());
        }
        return result;
    }
868165
protected function _finish()
		{

			// Check layout path
			$layoutPath = !is_null($this->request->route->module) ? $this->request->route->module->path . '/Layouts' : LAYOUT_PATH;

			// Layout set?
			if (!isset($this->_layout)) {

				// Layout in controller?
				if (!is_null(static::$layout)) {

					// Use that.
					$this->_layout = $layoutPath . '/' . static::$layout;

				} elseif (!is_null($this->request->route->module) && !is_null($this->request->route->module->defaultLayout)) {

					// Use that with module info
					$this->_layout = $layoutPath . '/' . $this->request->route->module->defaultLayout;
					

				} else {

					// Use app's default.
					$this->_layout = LAYOUT_PATH . '/' . Application::getConfiguration()->defaultLayout;

				}

			}

			// No layout?
			if ($this->_layout === false) {

				// Just output the content then.
				if (array_key_exists('main', $this->_renderedContent)) {
					echo $this->_renderedContent['main'];
				}

			} else {

				// Guess the extension
				$layoutFile = $this->_guessExtension($this->_layout);
				
				// Not found?
				if ($layoutFile === false) {
					throw new \Exception("Couldn't find layout for " . $this->_layout, 1);					
				}
				$this->_layout = $layoutFile;

				// Create and render the layout
				$layout = new Layout($this->_layout, $this, $this->_renderedContent);

			}


		}
1185915
def _push_async_cm_exit(self, cm, cm_exit):
        """"""
        _exit_wrapper = self._create_async_exit_wrapper(cm, cm_exit)
        self._push_exit_callback(_exit_wrapper, False)
884128
def do_layout(payload, layouts)
      self.output = _renderer.tap do |renderer|
        renderer.layouts = layouts
        renderer.payload = payload
      end.run

      Jekyll.logger.debug "Post-Render Hooks:", relative_path
      Jekyll::Hooks.trigger hook_owner, :post_render, self
    ensure
      @_renderer = nil # this will allow the modifications above to disappear
    end
1203417
def exit_with_error(message):
    
    click.secho(message, err=True, bg='red', fg='white')
    sys.exit(0)
1173768
function BuildLayout(layoutObject) {
    let finishedLayout = {
        start: "",
        end: "",
    };

    if (layoutObject) {
        const layout = new Layout(layoutObject.template);
        finishedLayout.start = `${layout.html.start}<head>${layoutObject.head}<style>${layoutObject.css}</style></head>${layout.body.start}${layout.template.start}`;
        finishedLayout.end = `${layout.template.end}${BuildScript(layoutObject.script)}${layout.body.end}${layout.html.end}`;
    } else {
        throw new Error("Missing Layout Object");
    }

    return finishedLayout;
}
731394
public static void createAndShowGUI(boolean exitOnClose) {
        try {
            for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (Exception ex) {
            try {
                // If Nimbus is not available, try system look and feel.
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            } catch (Exception e) {
                System.err.println(e);
            }
        }

        //Create and set up the window.
        JFrame frame = new JFrame("Smile Demo");
        frame.setSize(new Dimension(1000, 1000));
        frame.setLocationRelativeTo(null);

        if (exitOnClose)
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        else
            frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

        //Add content to the window.
        frame.add(new SmileDemo());

        //Display the window.
        frame.pack();
        frame.setVisible(true);
    }
303419
def init_layout(self):
        
        d = self.declaration
        self.create_notification()
        if d.show:
            self.set_show(d.show)
463288
def on_terminate(func):
    """"""
    def exit_function(*args):
        func()
        exit(0)
    signal.signal(signal.SIGTERM, exit_function)
1057067
def exit_with_success
        puts "\n\n  Exiting JumpStart...".purple
        puts "\n  Success! ".green + @project_name.green_bold + " has been created at: ".green + FileUtils.join_paths(@install_path, @project_name).green_bold + "\n\n".green
        puts "******************************************************************************************************************************************\n"
        JumpStart.dump_jumpstart_setup_yaml
        exit
      end
737277
def create_layout(self, size = None):
        """"""
        if not self.context:
            # TODO - this is rather sloppy as far as exception goes
            #        should explain better
            raise Exception("Can not create layout without existing context!")

        layout = pangocairo.create_layout(self.context)
        font_desc = pango.FontDescription(_font_desc)
        if size: font_desc.set_absolute_size(size * pango.SCALE)

        layout.set_font_description(font_desc)
        return layout
666833
def exit(self, message):
        

        self.output(message, normal=True, color="green")
        sys.exit()
494089
private LayoutManager createLayout() {
        SeaGlassContext context = getContext(this);
        LayoutManager   lm      = (LayoutManager) style.get(context, "InternalFrameTitlePane.titlePaneLayout");

        context.dispose();

        return (lm != null) ? lm : new SeaGlassTitlePaneLayout();
    }