napari_track_edit.__main__ ========================== .. py:module:: napari_track_edit.__main__ Attributes ---------- .. autoapisummary:: napari_track_edit.__main__.LOG_FORMAT Functions --------- .. autoapisummary:: napari_track_edit.__main__._configure_logging napari_track_edit.__main__._activate_on_macos napari_track_edit.__main__.main Module Contents --------------- .. py:data:: LOG_FORMAT :value: '%(asctime)s [%(filename)s:%(lineno)d] %(levelname)-8s %(message)s' .. py:function:: _configure_logging() -> None Send napari_track_edit's log records to the console. Configures our own package logger rather than the root logger, so napari, vispy and the rest of the dependency tree keep their own levels. Called from main(), not from an ``if __name__ == "__main__"`` block: the installed ``napari-track-edit`` command imports this module and calls main(), so such a block only runs for ``python -m napari_track_edit``. .. py:function:: _activate_on_macos(viewer: napari.Viewer) -> None Force the napari window (and its menu bar) to take focus on macOS. When napari is launched as a subprocess of another app (e.g. VS Code's integrated terminal), the OS sometimes leaves the parent app's menu bar in place even though napari's window is frontmost. Explicitly raising and activating the window nudges macOS into handing over the menu bar. .. py:function:: main()