napari_track_edit.__main__
Attributes
Functions
|
Send napari_track_edit's log records to the console. |
|
Force the napari window (and its menu bar) to take focus on macOS. |
|
Load the tracks given on the command line and show the Tracks List tab. |
|
Module Contents
- napari_track_edit.__main__.LOG_FORMAT = '%(asctime)s [%(filename)s:%(lineno)d] %(levelname)-8s %(message)s'
- napari_track_edit.__main__._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 installednapari-track-editcommand imports this module and calls main(), so such a block only runs forpython -m napari_track_edit.
- napari_track_edit.__main__._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.
- napari_track_edit.__main__._open_tracks(viewer: napari.Viewer, path: pathlib.Path) None
Load the tracks given on the command line and show the Tracks List tab.
Scheduled after StartupWidget’s own deferred setup, so it overrides the default foreground tab and any import dialog opens over a finished window.
- napari_track_edit.__main__.main()