# HG changeset patch # User Sebastien Jodogne # Date 1693503302 -7200 # Node ID e7a3b3d76f1c21e9b1bf32fe962b536178fa8902 # Parent caf69d2ee0709b2178e9346d4518035f8db2be4f documentation of new options in Python plugin 4.1 diff -r caf69d2ee070 -r e7a3b3d76f1c Sphinx/source/plugins/python.rst --- a/Sphinx/source/plugins/python.rst Wed Aug 30 14:30:40 2023 +0200 +++ b/Sphinx/source/plugins/python.rst Thu Aug 31 19:35:02 2023 +0200 @@ -214,7 +214,7 @@ Configuration options --------------------- -The only two configuration options that are available for this plugin +The two main configuration options that are available for this plugin are the following: * ``PythonScript`` indicates where the Python script is located. If @@ -223,6 +223,32 @@ * ``PythonVerbose`` is a Boolean value to make the Python interpreter verbose. + +Consequently, a minimal :ref:`configuration file ` for +Orthanc could be:: + + { + "Plugins" : [ "." ], + "PythonScript" : "my-plugin.py", + "PythonVerbose" : false + } + +Starting with release 4.1 of the Python plugin, it is also possible to +specify the configuration of the plugin in a dedicated ``Python`` +section as follows:: + + { + "Plugins" : [ "." ], + "Python" : { + "Path" : "my-plugin.py", // Alias for the global "PythonScript" option + "Verbose" : false, // Alias for the global "PythonVerbose" option + "DisplayMemoryUsage" : false + } + } + +The option ``Python.DisplayMemoryUsage`` was introduced in release 4.1 +of the plugin. If set to ``true``, Orthanc will display the memory +usage of the Python interpreter every second. Samples