comparison Sphinx/source/plugins/python.rst @ 978:e7a3b3d76f1c

documentation of new options in Python plugin 4.1
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 31 Aug 2023 19:35:02 +0200
parents eb49a4ad8fbc
children 46e2941b57dd
comparison
equal deleted inserted replaced
977:caf69d2ee070 978:e7a3b3d76f1c
212 212
213 213
214 Configuration options 214 Configuration options
215 --------------------- 215 ---------------------
216 216
217 The only two configuration options that are available for this plugin 217 The two main configuration options that are available for this plugin
218 are the following: 218 are the following:
219 219
220 * ``PythonScript`` indicates where the Python script is located. If 220 * ``PythonScript`` indicates where the Python script is located. If
221 this configuration option is not provided, the Python plugin is not 221 this configuration option is not provided, the Python plugin is not
222 started. 222 started.
223 223
224 * ``PythonVerbose`` is a Boolean value to make the Python interpreter 224 * ``PythonVerbose`` is a Boolean value to make the Python interpreter
225 verbose. 225 verbose.
226
227 Consequently, a minimal :ref:`configuration file <configuration>` for
228 Orthanc could be::
229
230 {
231 "Plugins" : [ "." ],
232 "PythonScript" : "my-plugin.py",
233 "PythonVerbose" : false
234 }
235
236 Starting with release 4.1 of the Python plugin, it is also possible to
237 specify the configuration of the plugin in a dedicated ``Python``
238 section as follows::
239
240 {
241 "Plugins" : [ "." ],
242 "Python" : {
243 "Path" : "my-plugin.py", // Alias for the global "PythonScript" option
244 "Verbose" : false, // Alias for the global "PythonVerbose" option
245 "DisplayMemoryUsage" : false
246 }
247 }
248
249 The option ``Python.DisplayMemoryUsage`` was introduced in release 4.1
250 of the plugin. If set to ``true``, Orthanc will display the memory
251 usage of the Python interpreter every second.
226 252
227 253
228 Samples 254 Samples
229 ------- 255 -------
230 256