diff --git a/src/mmpycorex/__init__.py b/src/mmpycorex/__init__.py index 4912d1d..01271e4 100644 --- a/src/mmpycorex/__init__.py +++ b/src/mmpycorex/__init__.py @@ -6,6 +6,6 @@ """ from ._version import __version__, version_info -from .launcher import create_core_instance, terminate_core_instances +from .launcher import create_core_instance, terminate_core_instances, is_pymmcore_active from .core import Core from .install import download_and_install_mm, find_existing_mm_install diff --git a/src/mmpycorex/_version.py b/src/mmpycorex/_version.py index 8ead122..8750e9a 100644 --- a/src/mmpycorex/_version.py +++ b/src/mmpycorex/_version.py @@ -1,2 +1,2 @@ -version_info = (0, 1, 7) +version_info = (0, 2, 0) __version__ = ".".join(map(str, version_info)) diff --git a/src/mmpycorex/launcher.py b/src/mmpycorex/launcher.py index 249cf56..fb50067 100644 --- a/src/mmpycorex/launcher.py +++ b/src/mmpycorex/launcher.py @@ -85,6 +85,9 @@ def _create_pymmcore_instance(): _JAVA_HEADLESS_SUBPROCESSES = [] _PYMMCORES = [] +def is_pymmcore_active(): + return len(_PYMMCORES) > 0 + def terminate_core_instances(debug=False): for p in _JAVA_HEADLESS_SUBPROCESSES: