euporie.console.app.ptk_get_app
- euporie.console.app.ptk_get_app() Application[Any]
Get the current active (running) Application. An
Applicationis active during theApplication.run_async()call.We assume that there can only be one
Applicationactive at the same time. There is only one terminal window, with only one stdin and stdout. This makes the code significantly easier than passing around theApplicationeverywhere.If no
Applicationis running, then return by default aDummyApplication. For practical reasons, we prefer to not raise an exception. This way, we don’t have to check all over the place whether an actual Application was returned.(For applications like pymux where we can have more than one Application, we’ll use a work-around to handle that.)