From f292ff3e431d8c505f09b71f4f63580e3cce73cd Mon Sep 17 00:00:00 2001 From: Joel Collins <2579603-jtc42@users.noreply.gitlab.com> Date: Tue, 7 Apr 2020 11:03:26 +0000 Subject: [PATCH] Revert "Added sleeps to check for blank capture fix" This reverts commit 32ddcd5d134a73d66bda1cd60f4857328028dfc3 --- docs/source/extensions/introduction.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/extensions/introduction.rst b/docs/source/extensions/introduction.rst index 6ba18da5..b1da263a 100644 --- a/docs/source/extensions/introduction.rst +++ b/docs/source/extensions/introduction.rst @@ -10,12 +10,12 @@ Extensions can either be loaded from a single Python file, or as a Python packag Single-file extensions ---------------------- -For adding simple functionality, such as a few basic functions and API routes, a single Python file can be loaded as a extension. This Python file must contain all of your extension objects, and be located in the applications extensions directory (by default ``~/.openflexure/microscope_extensions``). +For adding simple functionality, such as a few basic functions and API routes, a single Python file can be loaded as a extension. This Python file must contain all of your extension objects, and be located in the applications extensions directory (by default ``/var/openflexure/extensions/microscope_extensions``). Package extensions ------------------ Generally, for adding anything other than very simple functionality, extensions should be written as `package distributions `_. This has the advantage of allowing relative imports, so functionality can be easily split over several files. For example, class definitions associated with API routes can be separated from class definitions associated with the microscope extension. -The main restriction is that the extension package must be importable using an absolute import from within the Python environment being used to load your microscope. +Your module must be a folder within the extensions folder (by default ``/var/openflexure/extensions/microscope_extensions``), and include a top-level ``__init__.py`` file which includes (or imports) all of your extension objects. -In order to enable your packaged extension, create a file in the applications extensions directory (by default ``~/.openflexure/microscope_extensions``) which imports your extension object(s) from your module. +In order to enable a globally installed, packaged extension, create a file in the applications extensions directory (by default ``/var/openflexure/extensions/microscope_extensions``) which imports your extension object(s) from your module.