Browse Source

Release 85fa349c0c; Module documentation release

master
Dirk Alders 4 years ago
parent
commit
9fbd98f39c
99 changed files with 26350 additions and 5449 deletions
  1. 46
    43
      __init__.py
  2. 4
    0
      _docs_/.buildinfo
  3. BIN
      _docs_/_downloads/89eb74c94e7790229553fd55e6dfe3a3/unittest.pdf
  4. 23
    0
      _docs_/_sources/index.rst.txt
  5. 676
    0
      _docs_/_static/basic.css
  6. 1
    0
      _docs_/_static/css/badge_only.css
  7. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Bold.woff
  8. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Bold.woff2
  9. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Regular.woff
  10. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Regular.woff2
  11. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.eot
  12. 2671
    0
      _docs_/_static/css/fonts/fontawesome-webfont.svg
  13. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.ttf
  14. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.woff
  15. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.woff2
  16. BIN
      _docs_/_static/css/fonts/lato-bold-italic.woff
  17. BIN
      _docs_/_static/css/fonts/lato-bold-italic.woff2
  18. BIN
      _docs_/_static/css/fonts/lato-bold.woff
  19. BIN
      _docs_/_static/css/fonts/lato-bold.woff2
  20. BIN
      _docs_/_static/css/fonts/lato-normal-italic.woff
  21. BIN
      _docs_/_static/css/fonts/lato-normal-italic.woff2
  22. BIN
      _docs_/_static/css/fonts/lato-normal.woff
  23. BIN
      _docs_/_static/css/fonts/lato-normal.woff2
  24. 4
    0
      _docs_/_static/css/theme.css
  25. 315
    0
      _docs_/_static/doctools.js
  26. 10
    0
      _docs_/_static/documentation_options.js
  27. BIN
      _docs_/_static/file.png
  28. BIN
      _docs_/_static/fonts/FontAwesome.otf
  29. BIN
      _docs_/_static/fonts/Lato/lato-bold.eot
  30. BIN
      _docs_/_static/fonts/Lato/lato-bold.ttf
  31. BIN
      _docs_/_static/fonts/Lato/lato-bold.woff
  32. BIN
      _docs_/_static/fonts/Lato/lato-bold.woff2
  33. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.eot
  34. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.ttf
  35. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.woff
  36. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.woff2
  37. BIN
      _docs_/_static/fonts/Lato/lato-italic.eot
  38. BIN
      _docs_/_static/fonts/Lato/lato-italic.ttf
  39. BIN
      _docs_/_static/fonts/Lato/lato-italic.woff
  40. BIN
      _docs_/_static/fonts/Lato/lato-italic.woff2
  41. BIN
      _docs_/_static/fonts/Lato/lato-regular.eot
  42. BIN
      _docs_/_static/fonts/Lato/lato-regular.ttf
  43. BIN
      _docs_/_static/fonts/Lato/lato-regular.woff
  44. BIN
      _docs_/_static/fonts/Lato/lato-regular.woff2
  45. BIN
      _docs_/_static/fonts/Roboto-Slab-Bold.woff
  46. BIN
      _docs_/_static/fonts/Roboto-Slab-Bold.woff2
  47. BIN
      _docs_/_static/fonts/Roboto-Slab-Light.woff
  48. BIN
      _docs_/_static/fonts/Roboto-Slab-Light.woff2
  49. BIN
      _docs_/_static/fonts/Roboto-Slab-Regular.woff
  50. BIN
      _docs_/_static/fonts/Roboto-Slab-Regular.woff2
  51. BIN
      _docs_/_static/fonts/Roboto-Slab-Thin.woff
  52. BIN
      _docs_/_static/fonts/Roboto-Slab-Thin.woff2
  53. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot
  54. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf
  55. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff
  56. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2
  57. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot
  58. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf
  59. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff
  60. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2
  61. BIN
      _docs_/_static/fonts/fontawesome-webfont.eot
  62. 2671
    0
      _docs_/_static/fonts/fontawesome-webfont.svg
  63. BIN
      _docs_/_static/fonts/fontawesome-webfont.ttf
  64. BIN
      _docs_/_static/fonts/fontawesome-webfont.woff
  65. BIN
      _docs_/_static/fonts/fontawesome-webfont.woff2
  66. BIN
      _docs_/_static/fonts/lato-bold-italic.woff
  67. BIN
      _docs_/_static/fonts/lato-bold-italic.woff2
  68. BIN
      _docs_/_static/fonts/lato-bold.woff
  69. BIN
      _docs_/_static/fonts/lato-bold.woff2
  70. BIN
      _docs_/_static/fonts/lato-normal-italic.woff
  71. BIN
      _docs_/_static/fonts/lato-normal-italic.woff2
  72. BIN
      _docs_/_static/fonts/lato-normal.woff
  73. BIN
      _docs_/_static/fonts/lato-normal.woff2
  74. 10365
    0
      _docs_/_static/jquery.js
  75. 1
    0
      _docs_/_static/js/badge_only.js
  76. 4
    0
      _docs_/_static/js/html5shiv-printshiv.min.js
  77. 4
    0
      _docs_/_static/js/html5shiv.min.js
  78. 4
    0
      _docs_/_static/js/modernizr.min.js
  79. 1
    0
      _docs_/_static/js/theme.js
  80. 297
    0
      _docs_/_static/language_data.js
  81. BIN
      _docs_/_static/minus.png
  82. BIN
      _docs_/_static/plus.png
  83. 69
    0
      _docs_/_static/pygments.css
  84. 481
    0
      _docs_/_static/searchtools.js
  85. 1692
    0
      _docs_/_static/underscore.js
  86. 333
    0
      _docs_/genindex.html
  87. 743
    0
      _docs_/index.html
  88. BIN
      _docs_/objects.inv
  89. 216
    0
      _docs_/py-modindex.html
  90. 214
    0
      _docs_/search.html
  91. 1
    0
      _docs_/searchindex.js
  92. 11
    0
      _examples_/Makefile
  93. 24
    0
      _examples_/crontab.py
  94. 21
    0
      _examples_/delayed.py
  95. 34
    0
      _examples_/periodic.py
  96. 37
    0
      _examples_/threaded_queue.py
  97. 32
    0
      _examples_/tqueue.py
  98. 5345
    5406
      _testresults_/unittest.json
  99. BIN
      _testresults_/unittest.pdf

+ 46
- 43
__init__.py View File

@@ -23,7 +23,10 @@ task (Task Module)
23 23
 
24 24
 **Unittest:**
25 25
 
26
-        See also the :download:`unittest <../../task/_testresults_/unittest.pdf>` documentation.
26
+        See also the :download:`unittest <task/_testresults_/unittest.pdf>` documentation.
27
+
28
+**Module Documentation:**
29
+
27 30
 """
28 31
 __DEPENDENCIES__ = []
29 32
 
@@ -52,17 +55,18 @@ __INTERPRETER__ = (2, 3)
52 55
 
53 56
 
54 57
 class queue(object):
55
-    """Class to execute queued methods.
58
+    """
59
+    Class to execute queued callbacks.
56 60
 
57 61
     :param bool expire: The default value for expire. See also :py:func:`expire`.
58 62
 
59 63
     **Example:**
60 64
 
61
-    .. literalinclude:: ../../task/_examples_/queue.py
65
+    .. literalinclude:: task/_examples_/tqueue.py
62 66
 
63 67
     Will result to the following output:
64 68
 
65
-    .. literalinclude:: ../../task/_examples_/queue.log
69
+    .. literalinclude:: task/_examples_/tqueue.log
66 70
     """
67 71
     class job(object):
68 72
         def __init__(self, priority, callback, *args, **kwargs):
@@ -86,7 +90,7 @@ class queue(object):
86 90
         """
87 91
         This Methods removes all jobs from the queue.
88 92
 
89
-        .. note:: Be aware that already runnung jobs will not be terminated.
93
+        .. note:: Be aware that already running jobs will not be terminated.
90 94
         """
91 95
         while not self.queue.empty():
92 96
             try:
@@ -95,25 +99,25 @@ class queue(object):
95 99
                 continue          # needed, if the thread runs dry while cleaning the queue.
96 100
             self.queue.task_done()
97 101
 
98
-    def enqueue(self, priority, method, *args, **kwargs):
102
+    def enqueue(self, priority, callback, *args, **kwargs):
99 103
         """
100 104
         This enqueues a given callback.
101 105
 
102 106
         :param number priority: The priority indication number of this task. The lowest value will be queued first.
103
-        :param method method: Method to be executed
104
-        :param args args: Arguments to be given to method
105
-        :param kwargs kwargs: Kewordsarguments to be given to method
107
+        :param callback callback: Callback to be executed
108
+        :param args args: Arguments to be given to callback
109
+        :param kwargs kwargs: Keword Arguments to be given to callback
106 110
 
107
-        .. note:: Called method will get this instance as first argument, followed by :py:data:`args` und :py:data:`kwargs`.
111
+        .. note:: Callback will get this instance as first argument, followed by :py:data:`args` und :py:data:`kwargs`.
108 112
         """
109
-        self.queue.put(self.job(priority, method, *args, **kwargs))
113
+        self.queue.put(self.job(priority, callback, *args, **kwargs))
110 114
 
111 115
     def qsize(self):
112 116
         return self.queue.qsize()
113 117
 
114 118
     def run(self):
115 119
         """
116
-        This starts the execution of the queued methods.
120
+        This starts the execution of the queued callbacks.
117 121
         """
118 122
         self.__stop = False
119 123
         while not self.__stop:
@@ -139,17 +143,17 @@ class queue(object):
139 143
 
140 144
 
141 145
 class threaded_queue(queue):
142
-    """Class to execute queued methods in a background thread (See also parent :py:class:`queue`).
146
+    """Class to execute queued callbacks in a background thread (See also parent :py:class:`queue`).
143 147
 
144 148
     :param bool expire: The default value for expire. See also :py:func:`queue.expire`.
145 149
 
146 150
     **Example:**
147 151
 
148
-    .. literalinclude:: ../../task/_examples_/threaded_queue.py
152
+    .. literalinclude:: task/_examples_/threaded_queue.py
149 153
 
150 154
     Will result to the following output:
151 155
 
152
-    .. literalinclude:: ../../task/_examples_/threaded_queue.log
156
+    .. literalinclude:: task/_examples_/threaded_queue.log
153 157
     """
154 158
     def __init__(self, expire=False):
155 159
         queue.__init__(self, expire=expire)
@@ -181,27 +185,27 @@ class threaded_queue(queue):
181 185
 
182 186
 class periodic(object):
183 187
     """
184
-    :param float cycle_time: Cycle time in seconds -- method will be executed every *cycle_time* seconds
185
-    :param method method: Method to be executed
186
-    :param args args: Arguments to be given to method
187
-    :param kwargs kwargs: Kewordsarguments to be given to method
188
+    Class to execute a callback cyclicly.
188 189
 
189
-    Class to execute a method cyclicly.
190
+    :param float cycle_time: Cycle time in seconds -- callback will be executed every *cycle_time* seconds
191
+    :param callback callback: Callback to be executed
192
+    :param args args: Arguments to be given to the callback
193
+    :param kwargs kwargs: Keword Arguments to be given to callback
190 194
 
191
-    .. note:: Called method will get this instance as first argument, followed by :py:data:`args` und :py:data:`kwargs`.
195
+    .. note:: The Callback will get this instance as first argument, followed by :py:data:`args` und :py:data:`kwargs`.
192 196
 
193 197
     **Example:**
194 198
 
195
-    .. literalinclude:: ../../task/_examples_/periodic.py
199
+    .. literalinclude:: task/_examples_/periodic.py
196 200
 
197 201
     Will result to the following output:
198 202
 
199
-    .. literalinclude:: ../../task/_examples_/periodic.log
203
+    .. literalinclude:: task/_examples_/periodic.log
200 204
     """
201
-    def __init__(self, cycle_time, method, *args, **kwargs):
205
+    def __init__(self, cycle_time, callback, *args, **kwargs):
202 206
         self._lock = threading.Lock()
203 207
         self._timer = None
204
-        self.method = method
208
+        self.callback = callback
205 209
         self.cycle_time = cycle_time
206 210
         self.args = args
207 211
         self.kwargs = kwargs
@@ -209,27 +213,25 @@ class periodic(object):
209 213
         self._last_tm = None
210 214
         self.dt = None
211 215
 
212
-    def join(self, timeout=0.1):
216
+    def join(self):
213 217
         """
214 218
         This blocks till the cyclic task is terminated.
215 219
 
216
-        :param float timeout: Cycle time for checking if task is stopped
217
-
218
-        .. note:: Using join means that somewhere has to be a condition calling :py:func:`stop` to terminate.
220
+        .. note:: Using join means that somewhere has to be a condition calling :py:func:`stop` to terminate. Otherwise :func:`task.join` will never return.
219 221
         """
220 222
         while not self._stopped:
221
-            time.sleep(timeout)
223
+            time.sleep(.1)
222 224
 
223 225
     def run(self):
224 226
         """
225
-        This starts the cyclic execution of the given method.
227
+        This starts the cyclic execution of the given callback.
226 228
         """
227 229
         if self._stopped:
228 230
             self._set_timer(force_now=True)
229 231
 
230 232
     def stop(self):
231 233
         """
232
-        This stops the execution of any following task.
234
+        This stops the execution of any further task.
233 235
         """
234 236
         self._lock.acquire()
235 237
         self._stopped = True
@@ -255,25 +257,25 @@ class periodic(object):
255 257
         if self._last_tm is not None:
256 258
             self.dt = tm - self._last_tm
257 259
         self._set_timer(force_now=False)
258
-        self.method(self, *self.args, **self.kwargs)
260
+        self.callback(self, *self.args, **self.kwargs)
259 261
         self._last_tm = tm
260 262
 
261 263
 
262 264
 class delayed(periodic):
263
-    """Class to execute a method a given time in the future. See also parent :py:class:`periodic`.
265
+    """Class to execute a callback a given time in the future. See also parent :py:class:`periodic`.
264 266
 
265
-    :param float time: Delay time for execution of the given method
266
-    :param method method: Method to be executed
267
-    :param args args: Arguments to be given to method
268
-    :param kwargs kwargs: Kewordsarguments to be given to method
267
+    :param float time: Delay time for execution of the given callback
268
+    :param callback callback: Callback to be executed
269
+    :param args args: Arguments to be given to callback
270
+    :param kwargs kwargs: Keword Arguments to be given to callback
269 271
 
270 272
     **Example:**
271 273
 
272
-    .. literalinclude:: ../../task/_examples_/delayed.py
274
+    .. literalinclude:: task/_examples_/delayed.py
273 275
 
274 276
     Will result to the following output:
275 277
 
276
-    .. literalinclude:: ../../task/_examples_/delayed.log
278
+    .. literalinclude:: task/_examples_/delayed.log
277 279
     """
278 280
     def run(self):
279 281
         """
@@ -282,7 +284,7 @@ class delayed(periodic):
282 284
         self._set_timer(force_now=False)
283 285
 
284 286
     def _start(self):
285
-        self.method(*self.args, **self.kwargs)
287
+        self.callback(*self.args, **self.kwargs)
286 288
         self.stop()
287 289
 
288 290
 
@@ -294,11 +296,11 @@ class crontab(periodic):
294 296
 
295 297
     **Example:**
296 298
 
297
-    .. literalinclude:: ../../task/_examples_/crontab.py
299
+    .. literalinclude:: task/_examples_/crontab.py
298 300
 
299 301
     Will result to the following output:
300 302
 
301
-    .. literalinclude:: ../../task/_examples_/crontab.log
303
+    .. literalinclude:: task/_examples_/crontab.log
302 304
     """
303 305
     ANY = '*'
304 306
     """Constant for matching every condition."""
@@ -421,5 +423,6 @@ class crontab(periodic):
421 423
         :type callback: func
422 424
 
423 425
         .. note:: The ``callback`` will be executed with it's instance of :py:class:`cronjob` as the first parameter.
426
+            The given Arguments (:data:`args`) and keyword Arguments (:data:`kwargs`) will be stored in that object.
424 427
         """
425 428
         self.__crontab__.append(self.cronjob(minute, hour, day_of_month, month, day_of_week, callback, *args, **kwargs))

+ 4
- 0
_docs_/.buildinfo View File

@@ -0,0 +1,4 @@
1
+# Sphinx build info version 1
2
+# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3
+config: 17193eb3c7f9cd8c979bdb4e7d126256
4
+tags: 645f666f9bcd5a90fca523b33c5a78b7

BIN
_docs_/_downloads/89eb74c94e7790229553fd55e6dfe3a3/unittest.pdf View File


+ 23
- 0
_docs_/_sources/index.rst.txt View File

@@ -0,0 +1,23 @@
1
+.. task documentation master file, created by
2
+   sphinx-quickstart on Thu Jan  7 02:26:45 2021.
3
+   You can adapt this file completely to your liking, but it should at least
4
+   contain the root `toctree` directive.
5
+
6
+Welcome to task's documentation!
7
+================================
8
+
9
+.. automodule:: task
10
+   :members:
11
+
12
+.. toctree::
13
+   :maxdepth: 2
14
+   :caption: Contents:
15
+
16
+
17
+
18
+Indices and tables
19
+==================
20
+
21
+* :ref:`genindex`
22
+* :ref:`modindex`
23
+* :ref:`search`

+ 676
- 0
_docs_/_static/basic.css View File

@@ -0,0 +1,676 @@
1
+/*
2
+ * basic.css
3
+ * ~~~~~~~~~
4
+ *
5
+ * Sphinx stylesheet -- basic theme.
6
+ *
7
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+/* -- main layout ----------------------------------------------------------- */
13
+
14
+div.clearer {
15
+    clear: both;
16
+}
17
+
18
+/* -- relbar ---------------------------------------------------------------- */
19
+
20
+div.related {
21
+    width: 100%;
22
+    font-size: 90%;
23
+}
24
+
25
+div.related h3 {
26
+    display: none;
27
+}
28
+
29
+div.related ul {
30
+    margin: 0;
31
+    padding: 0 0 0 10px;
32
+    list-style: none;
33
+}
34
+
35
+div.related li {
36
+    display: inline;
37
+}
38
+
39
+div.related li.right {
40
+    float: right;
41
+    margin-right: 5px;
42
+}
43
+
44
+/* -- sidebar --------------------------------------------------------------- */
45
+
46
+div.sphinxsidebarwrapper {
47
+    padding: 10px 5px 0 10px;
48
+}
49
+
50
+div.sphinxsidebar {
51
+    float: left;
52
+    width: 230px;
53
+    margin-left: -100%;
54
+    font-size: 90%;
55
+    word-wrap: break-word;
56
+    overflow-wrap : break-word;
57
+}
58
+
59
+div.sphinxsidebar ul {
60
+    list-style: none;
61
+}
62
+
63
+div.sphinxsidebar ul ul,
64
+div.sphinxsidebar ul.want-points {
65
+    margin-left: 20px;
66
+    list-style: square;
67
+}
68
+
69
+div.sphinxsidebar ul ul {
70
+    margin-top: 0;
71
+    margin-bottom: 0;
72
+}
73
+
74
+div.sphinxsidebar form {
75
+    margin-top: 10px;
76
+}
77
+
78
+div.sphinxsidebar input {
79
+    border: 1px solid #98dbcc;
80
+    font-family: sans-serif;
81
+    font-size: 1em;
82
+}
83
+
84
+div.sphinxsidebar #searchbox form.search {
85
+    overflow: hidden;
86
+}
87
+
88
+div.sphinxsidebar #searchbox input[type="text"] {
89
+    float: left;
90
+    width: 80%;
91
+    padding: 0.25em;
92
+    box-sizing: border-box;
93
+}
94
+
95
+div.sphinxsidebar #searchbox input[type="submit"] {
96
+    float: left;
97
+    width: 20%;
98
+    border-left: none;
99
+    padding: 0.25em;
100
+    box-sizing: border-box;
101
+}
102
+
103
+
104
+img {
105
+    border: 0;
106
+    max-width: 100%;
107
+}
108
+
109
+/* -- search page ----------------------------------------------------------- */
110
+
111
+ul.search {
112
+    margin: 10px 0 0 20px;
113
+    padding: 0;
114
+}
115
+
116
+ul.search li {
117
+    padding: 5px 0 5px 20px;
118
+    background-image: url(file.png);
119
+    background-repeat: no-repeat;
120
+    background-position: 0 7px;
121
+}
122
+
123
+ul.search li a {
124
+    font-weight: bold;
125
+}
126
+
127
+ul.search li div.context {
128
+    color: #888;
129
+    margin: 2px 0 0 30px;
130
+    text-align: left;
131
+}
132
+
133
+ul.keywordmatches li.goodmatch a {
134
+    font-weight: bold;
135
+}
136
+
137
+/* -- index page ------------------------------------------------------------ */
138
+
139
+table.contentstable {
140
+    width: 90%;
141
+    margin-left: auto;
142
+    margin-right: auto;
143
+}
144
+
145
+table.contentstable p.biglink {
146
+    line-height: 150%;
147
+}
148
+
149
+a.biglink {
150
+    font-size: 1.3em;
151
+}
152
+
153
+span.linkdescr {
154
+    font-style: italic;
155
+    padding-top: 5px;
156
+    font-size: 90%;
157
+}
158
+
159
+/* -- general index --------------------------------------------------------- */
160
+
161
+table.indextable {
162
+    width: 100%;
163
+}
164
+
165
+table.indextable td {
166
+    text-align: left;
167
+    vertical-align: top;
168
+}
169
+
170
+table.indextable ul {
171
+    margin-top: 0;
172
+    margin-bottom: 0;
173
+    list-style-type: none;
174
+}
175
+
176
+table.indextable > tbody > tr > td > ul {
177
+    padding-left: 0em;
178
+}
179
+
180
+table.indextable tr.pcap {
181
+    height: 10px;
182
+}
183
+
184
+table.indextable tr.cap {
185
+    margin-top: 10px;
186
+    background-color: #f2f2f2;
187
+}
188
+
189
+img.toggler {
190
+    margin-right: 3px;
191
+    margin-top: 3px;
192
+    cursor: pointer;
193
+}
194
+
195
+div.modindex-jumpbox {
196
+    border-top: 1px solid #ddd;
197
+    border-bottom: 1px solid #ddd;
198
+    margin: 1em 0 1em 0;
199
+    padding: 0.4em;
200
+}
201
+
202
+div.genindex-jumpbox {
203
+    border-top: 1px solid #ddd;
204
+    border-bottom: 1px solid #ddd;
205
+    margin: 1em 0 1em 0;
206
+    padding: 0.4em;
207
+}
208
+
209
+/* -- domain module index --------------------------------------------------- */
210
+
211
+table.modindextable td {
212
+    padding: 2px;
213
+    border-collapse: collapse;
214
+}
215
+
216
+/* -- general body styles --------------------------------------------------- */
217
+
218
+div.body {
219
+    min-width: 450px;
220
+    max-width: 800px;
221
+}
222
+
223
+div.body p, div.body dd, div.body li, div.body blockquote {
224
+    -moz-hyphens: auto;
225
+    -ms-hyphens: auto;
226
+    -webkit-hyphens: auto;
227
+    hyphens: auto;
228
+}
229
+
230
+a.headerlink {
231
+    visibility: hidden;
232
+}
233
+
234
+h1:hover > a.headerlink,
235
+h2:hover > a.headerlink,
236
+h3:hover > a.headerlink,
237
+h4:hover > a.headerlink,
238
+h5:hover > a.headerlink,
239
+h6:hover > a.headerlink,
240
+dt:hover > a.headerlink,
241
+caption:hover > a.headerlink,
242
+p.caption:hover > a.headerlink,
243
+div.code-block-caption:hover > a.headerlink {
244
+    visibility: visible;
245
+}
246
+
247
+div.body p.caption {
248
+    text-align: inherit;
249
+}
250
+
251
+div.body td {
252
+    text-align: left;
253
+}
254
+
255
+.first {
256
+    margin-top: 0 !important;
257
+}
258
+
259
+p.rubric {
260
+    margin-top: 30px;
261
+    font-weight: bold;
262
+}
263
+
264
+img.align-left, .figure.align-left, object.align-left {
265
+    clear: left;
266
+    float: left;
267
+    margin-right: 1em;
268
+}
269
+
270
+img.align-right, .figure.align-right, object.align-right {
271
+    clear: right;
272
+    float: right;
273
+    margin-left: 1em;
274
+}
275
+
276
+img.align-center, .figure.align-center, object.align-center {
277
+  display: block;
278
+  margin-left: auto;
279
+  margin-right: auto;
280
+}
281
+
282
+.align-left {
283
+    text-align: left;
284
+}
285
+
286
+.align-center {
287
+    text-align: center;
288
+}
289
+
290
+.align-right {
291
+    text-align: right;
292
+}
293
+
294
+/* -- sidebars -------------------------------------------------------------- */
295
+
296
+div.sidebar {
297
+    margin: 0 0 0.5em 1em;
298
+    border: 1px solid #ddb;
299
+    padding: 7px 7px 0 7px;
300
+    background-color: #ffe;
301
+    width: 40%;
302
+    float: right;
303
+}
304
+
305
+p.sidebar-title {
306
+    font-weight: bold;
307
+}
308
+
309
+/* -- topics ---------------------------------------------------------------- */
310
+
311
+div.topic {
312
+    border: 1px solid #ccc;
313
+    padding: 7px 7px 0 7px;
314
+    margin: 10px 0 10px 0;
315
+}
316
+
317
+p.topic-title {
318
+    font-size: 1.1em;
319
+    font-weight: bold;
320
+    margin-top: 10px;
321
+}
322
+
323
+/* -- admonitions ----------------------------------------------------------- */
324
+
325
+div.admonition {
326
+    margin-top: 10px;
327
+    margin-bottom: 10px;
328
+    padding: 7px;
329
+}
330
+
331
+div.admonition dt {
332
+    font-weight: bold;
333
+}
334
+
335
+div.admonition dl {
336
+    margin-bottom: 0;
337
+}
338
+
339
+p.admonition-title {
340
+    margin: 0px 10px 5px 0px;
341
+    font-weight: bold;
342
+}
343
+
344
+div.body p.centered {
345
+    text-align: center;
346
+    margin-top: 25px;
347
+}
348
+
349
+/* -- tables ---------------------------------------------------------------- */
350
+
351
+table.docutils {
352
+    border: 0;
353
+    border-collapse: collapse;
354
+}
355
+
356
+table.align-center {
357
+    margin-left: auto;
358
+    margin-right: auto;
359
+}
360
+
361
+table caption span.caption-number {
362
+    font-style: italic;
363
+}
364
+
365
+table caption span.caption-text {
366
+}
367
+
368
+table.docutils td, table.docutils th {
369
+    padding: 1px 8px 1px 5px;
370
+    border-top: 0;
371
+    border-left: 0;
372
+    border-right: 0;
373
+    border-bottom: 1px solid #aaa;
374
+}
375
+
376
+table.footnote td, table.footnote th {
377
+    border: 0 !important;
378
+}
379
+
380
+th {
381
+    text-align: left;
382
+    padding-right: 5px;
383
+}
384
+
385
+table.citation {
386
+    border-left: solid 1px gray;
387
+    margin-left: 1px;
388
+}
389
+
390
+table.citation td {
391
+    border-bottom: none;
392
+}
393
+
394
+/* -- figures --------------------------------------------------------------- */
395
+
396
+div.figure {
397
+    margin: 0.5em;
398
+    padding: 0.5em;
399
+}
400
+
401
+div.figure p.caption {
402
+    padding: 0.3em;
403
+}
404
+
405
+div.figure p.caption span.caption-number {
406
+    font-style: italic;
407
+}
408
+
409
+div.figure p.caption span.caption-text {
410
+}
411
+
412
+/* -- field list styles ----------------------------------------------------- */
413
+
414
+table.field-list td, table.field-list th {
415
+    border: 0 !important;
416
+}
417
+
418
+.field-list ul {
419
+    margin: 0;
420
+    padding-left: 1em;
421
+}
422
+
423
+.field-list p {
424
+    margin: 0;
425
+}
426
+
427
+.field-name {
428
+    -moz-hyphens: manual;
429
+    -ms-hyphens: manual;
430
+    -webkit-hyphens: manual;
431
+    hyphens: manual;
432
+}
433
+
434
+/* -- hlist styles ---------------------------------------------------------- */
435
+
436
+table.hlist td {
437
+    vertical-align: top;
438
+}
439
+
440
+
441
+/* -- other body styles ----------------------------------------------------- */
442
+
443
+ol.arabic {
444
+    list-style: decimal;
445
+}
446
+
447
+ol.loweralpha {
448
+    list-style: lower-alpha;
449
+}
450
+
451
+ol.upperalpha {
452
+    list-style: upper-alpha;
453
+}
454
+
455
+ol.lowerroman {
456
+    list-style: lower-roman;
457
+}
458
+
459
+ol.upperroman {
460
+    list-style: upper-roman;
461
+}
462
+
463
+dl {
464
+    margin-bottom: 15px;
465
+}
466
+
467
+dd p {
468
+    margin-top: 0px;
469
+}
470
+
471
+dd ul, dd table {
472
+    margin-bottom: 10px;
473
+}
474
+
475
+dd {
476
+    margin-top: 3px;
477
+    margin-bottom: 10px;
478
+    margin-left: 30px;
479
+}
480
+
481
+dt:target, span.highlighted {
482
+    background-color: #fbe54e;
483
+}
484
+
485
+rect.highlighted {
486
+    fill: #fbe54e;
487
+}
488
+
489
+dl.glossary dt {
490
+    font-weight: bold;
491
+    font-size: 1.1em;
492
+}
493
+
494
+.optional {
495
+    font-size: 1.3em;
496
+}
497
+
498
+.sig-paren {
499
+    font-size: larger;
500
+}
501
+
502
+.versionmodified {
503
+    font-style: italic;
504
+}
505
+
506
+.system-message {
507
+    background-color: #fda;
508
+    padding: 5px;
509
+    border: 3px solid red;
510
+}
511
+
512
+.footnote:target  {
513
+    background-color: #ffa;
514
+}
515
+
516
+.line-block {
517
+    display: block;
518
+    margin-top: 1em;
519
+    margin-bottom: 1em;
520
+}
521
+
522
+.line-block .line-block {
523
+    margin-top: 0;
524
+    margin-bottom: 0;
525
+    margin-left: 1.5em;
526
+}
527
+
528
+.guilabel, .menuselection {
529
+    font-family: sans-serif;
530
+}
531
+
532
+.accelerator {
533
+    text-decoration: underline;
534
+}
535
+
536
+.classifier {
537
+    font-style: oblique;
538
+}
539
+
540
+abbr, acronym {
541
+    border-bottom: dotted 1px;
542
+    cursor: help;
543
+}
544
+
545
+/* -- code displays --------------------------------------------------------- */
546
+
547
+pre {
548
+    overflow: auto;
549
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
550
+}
551
+
552
+span.pre {
553
+    -moz-hyphens: none;
554
+    -ms-hyphens: none;
555
+    -webkit-hyphens: none;
556
+    hyphens: none;
557
+}
558
+
559
+td.linenos pre {
560
+    padding: 5px 0px;
561
+    border: 0;
562
+    background-color: transparent;
563
+    color: #aaa;
564
+}
565
+
566
+table.highlighttable {
567
+    margin-left: 0.5em;
568
+}
569
+
570
+table.highlighttable td {
571
+    padding: 0 0.5em 0 0.5em;
572
+}
573
+
574
+div.code-block-caption {
575
+    padding: 2px 5px;
576
+    font-size: small;
577
+}
578
+
579
+div.code-block-caption code {
580
+    background-color: transparent;
581
+}
582
+
583
+div.code-block-caption + div > div.highlight > pre {
584
+    margin-top: 0;
585
+}
586
+
587
+div.code-block-caption span.caption-number {
588
+    padding: 0.1em 0.3em;
589
+    font-style: italic;
590
+}
591
+
592
+div.code-block-caption span.caption-text {
593
+}
594
+
595
+div.literal-block-wrapper {
596
+    padding: 1em 1em 0;
597
+}
598
+
599
+div.literal-block-wrapper div.highlight {
600
+    margin: 0;
601
+}
602
+
603
+code.descname {
604
+    background-color: transparent;
605
+    font-weight: bold;
606
+    font-size: 1.2em;
607
+}
608
+
609
+code.descclassname {
610
+    background-color: transparent;
611
+}
612
+
613
+code.xref, a code {
614
+    background-color: transparent;
615
+    font-weight: bold;
616
+}
617
+
618
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
619
+    background-color: transparent;
620
+}
621
+
622
+.viewcode-link {
623
+    float: right;
624
+}
625
+
626
+.viewcode-back {
627
+    float: right;
628
+    font-family: sans-serif;
629
+}
630
+
631
+div.viewcode-block:target {
632
+    margin: -1px -10px;
633
+    padding: 0 10px;
634
+}
635
+
636
+/* -- math display ---------------------------------------------------------- */
637
+
638
+img.math {
639
+    vertical-align: middle;
640
+}
641
+
642
+div.body div.math p {
643
+    text-align: center;
644
+}
645
+
646
+span.eqno {
647
+    float: right;
648
+}
649
+
650
+span.eqno a.headerlink {
651
+    position: relative;
652
+    left: 0px;
653
+    z-index: 1;
654
+}
655
+
656
+div.math:hover a.headerlink {
657
+    visibility: visible;
658
+}
659
+
660
+/* -- printout stylesheet --------------------------------------------------- */
661
+
662
+@media print {
663
+    div.document,
664
+    div.documentwrapper,
665
+    div.bodywrapper {
666
+        margin: 0 !important;
667
+        width: 100%;
668
+    }
669
+
670
+    div.sphinxsidebar,
671
+    div.related,
672
+    div.footer,
673
+    #top-link {
674
+        display: none;
675
+    }
676
+}

+ 1
- 0
_docs_/_static/css/badge_only.css View File

@@ -0,0 +1 @@
1
+.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}

BIN
_docs_/_static/css/fonts/Roboto-Slab-Bold.woff View File


BIN
_docs_/_static/css/fonts/Roboto-Slab-Bold.woff2 View File


BIN
_docs_/_static/css/fonts/Roboto-Slab-Regular.woff View File


BIN
_docs_/_static/css/fonts/Roboto-Slab-Regular.woff2 View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.eot View File


+ 2671
- 0
_docs_/_static/css/fonts/fontawesome-webfont.svg
File diff suppressed because it is too large
View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.ttf View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.woff View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.woff2 View File


BIN
_docs_/_static/css/fonts/lato-bold-italic.woff View File


BIN
_docs_/_static/css/fonts/lato-bold-italic.woff2 View File


BIN
_docs_/_static/css/fonts/lato-bold.woff View File


BIN
_docs_/_static/css/fonts/lato-bold.woff2 View File


BIN
_docs_/_static/css/fonts/lato-normal-italic.woff View File


BIN
_docs_/_static/css/fonts/lato-normal-italic.woff2 View File


BIN
_docs_/_static/css/fonts/lato-normal.woff View File


BIN
_docs_/_static/css/fonts/lato-normal.woff2 View File


+ 4
- 0
_docs_/_static/css/theme.css
File diff suppressed because it is too large
View File


+ 315
- 0
_docs_/_static/doctools.js View File

@@ -0,0 +1,315 @@
1
+/*
2
+ * doctools.js
3
+ * ~~~~~~~~~~~
4
+ *
5
+ * Sphinx JavaScript utilities for all documentation.
6
+ *
7
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+/**
13
+ * select a different prefix for underscore
14
+ */
15
+$u = _.noConflict();
16
+
17
+/**
18
+ * make the code below compatible with browsers without
19
+ * an installed firebug like debugger
20
+if (!window.console || !console.firebug) {
21
+  var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
22
+    "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
23
+    "profile", "profileEnd"];
24
+  window.console = {};
25
+  for (var i = 0; i < names.length; ++i)
26
+    window.console[names[i]] = function() {};
27
+}
28
+ */
29
+
30
+/**
31
+ * small helper function to urldecode strings
32
+ */
33
+jQuery.urldecode = function(x) {
34
+  return decodeURIComponent(x).replace(/\+/g, ' ');
35
+};
36
+
37
+/**
38
+ * small helper function to urlencode strings
39
+ */
40
+jQuery.urlencode = encodeURIComponent;
41
+
42
+/**
43
+ * This function returns the parsed url parameters of the
44
+ * current request. Multiple values per key are supported,
45
+ * it will always return arrays of strings for the value parts.
46
+ */
47
+jQuery.getQueryParameters = function(s) {
48
+  if (typeof s === 'undefined')
49
+    s = document.location.search;
50
+  var parts = s.substr(s.indexOf('?') + 1).split('&');
51
+  var result = {};
52
+  for (var i = 0; i < parts.length; i++) {
53
+    var tmp = parts[i].split('=', 2);
54
+    var key = jQuery.urldecode(tmp[0]);
55
+    var value = jQuery.urldecode(tmp[1]);
56
+    if (key in result)
57
+      result[key].push(value);
58
+    else
59
+      result[key] = [value];
60
+  }
61
+  return result;
62
+};
63
+
64
+/**
65
+ * highlight a given string on a jquery object by wrapping it in
66
+ * span elements with the given class name.
67
+ */
68
+jQuery.fn.highlightText = function(text, className) {
69
+  function highlight(node, addItems) {
70
+    if (node.nodeType === 3) {
71
+      var val = node.nodeValue;
72
+      var pos = val.toLowerCase().indexOf(text);
73
+      if (pos >= 0 &&
74
+          !jQuery(node.parentNode).hasClass(className) &&
75
+          !jQuery(node.parentNode).hasClass("nohighlight")) {
76
+        var span;
77
+        var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
78
+        if (isInSVG) {
79
+          span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
80
+        } else {
81
+          span = document.createElement("span");
82
+          span.className = className;
83
+        }
84
+        span.appendChild(document.createTextNode(val.substr(pos, text.length)));
85
+        node.parentNode.insertBefore(span, node.parentNode.insertBefore(
86
+          document.createTextNode(val.substr(pos + text.length)),
87
+          node.nextSibling));
88
+        node.nodeValue = val.substr(0, pos);
89
+        if (isInSVG) {
90
+          var bbox = span.getBBox();
91
+          var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
92
+       	  rect.x.baseVal.value = bbox.x;
93
+          rect.y.baseVal.value = bbox.y;
94
+          rect.width.baseVal.value = bbox.width;
95
+          rect.height.baseVal.value = bbox.height;
96
+          rect.setAttribute('class', className);
97
+          var parentOfText = node.parentNode.parentNode;
98
+          addItems.push({
99
+              "parent": node.parentNode,
100
+              "target": rect});
101
+        }
102
+      }
103
+    }
104
+    else if (!jQuery(node).is("button, select, textarea")) {
105
+      jQuery.each(node.childNodes, function() {
106
+        highlight(this, addItems);
107
+      });
108
+    }
109
+  }
110
+  var addItems = [];
111
+  var result = this.each(function() {
112
+    highlight(this, addItems);
113
+  });
114
+  for (var i = 0; i < addItems.length; ++i) {
115
+    jQuery(addItems[i].parent).before(addItems[i].target);
116
+  }
117
+  return result;
118
+};
119
+
120
+/*
121
+ * backward compatibility for jQuery.browser
122
+ * This will be supported until firefox bug is fixed.
123
+ */
124
+if (!jQuery.browser) {
125
+  jQuery.uaMatch = function(ua) {
126
+    ua = ua.toLowerCase();
127
+
128
+    var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
129
+      /(webkit)[ \/]([\w.]+)/.exec(ua) ||
130
+      /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
131
+      /(msie) ([\w.]+)/.exec(ua) ||
132
+      ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
133
+      [];
134
+
135
+    return {
136
+      browser: match[ 1 ] || "",
137
+      version: match[ 2 ] || "0"
138
+    };
139
+  };
140
+  jQuery.browser = {};
141
+  jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
142
+}
143
+
144
+/**
145
+ * Small JavaScript module for the documentation.
146
+ */
147
+var Documentation = {
148
+
149
+  init : function() {
150
+    this.fixFirefoxAnchorBug();
151
+    this.highlightSearchWords();
152
+    this.initIndexTable();
153
+    if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
154
+      this.initOnKeyListeners();
155
+    }
156
+  },
157
+
158
+  /**
159
+   * i18n support
160
+   */
161
+  TRANSLATIONS : {},
162
+  PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
163
+  LOCALE : 'unknown',
164
+
165
+  // gettext and ngettext don't access this so that the functions
166
+  // can safely bound to a different name (_ = Documentation.gettext)
167
+  gettext : function(string) {
168
+    var translated = Documentation.TRANSLATIONS[string];
169
+    if (typeof translated === 'undefined')
170
+      return string;
171
+    return (typeof translated === 'string') ? translated : translated[0];
172
+  },
173
+
174
+  ngettext : function(singular, plural, n) {
175
+    var translated = Documentation.TRANSLATIONS[singular];
176
+    if (typeof translated === 'undefined')
177
+      return (n == 1) ? singular : plural;
178
+    return translated[Documentation.PLURALEXPR(n)];
179
+  },
180
+
181
+  addTranslations : function(catalog) {
182
+    for (var key in catalog.messages)
183
+      this.TRANSLATIONS[key] = catalog.messages[key];
184
+    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
185
+    this.LOCALE = catalog.locale;
186
+  },
187
+
188
+  /**
189
+   * add context elements like header anchor links
190
+   */
191
+  addContextElements : function() {
192
+    $('div[id] > :header:first').each(function() {
193
+      $('<a class="headerlink">\u00B6</a>').
194
+      attr('href', '#' + this.id).
195
+      attr('title', _('Permalink to this headline')).
196
+      appendTo(this);
197
+    });
198
+    $('dt[id]').each(function() {
199
+      $('<a class="headerlink">\u00B6</a>').
200
+      attr('href', '#' + this.id).
201
+      attr('title', _('Permalink to this definition')).
202
+      appendTo(this);
203
+    });
204
+  },
205
+
206
+  /**
207
+   * workaround a firefox stupidity
208
+   * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
209
+   */
210
+  fixFirefoxAnchorBug : function() {
211
+    if (document.location.hash && $.browser.mozilla)
212
+      window.setTimeout(function() {
213
+        document.location.href += '';
214
+      }, 10);
215
+  },
216
+
217
+  /**
218
+   * highlight the search words provided in the url in the text
219
+   */
220
+  highlightSearchWords : function() {
221
+    var params = $.getQueryParameters();
222
+    var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
223
+    if (terms.length) {
224
+      var body = $('div.body');
225
+      if (!body.length) {
226
+        body = $('body');
227
+      }
228
+      window.setTimeout(function() {
229
+        $.each(terms, function() {
230
+          body.highlightText(this.toLowerCase(), 'highlighted');
231
+        });
232
+      }, 10);
233
+      $('<p class="highlight-link"><a href="javascript:Documentation.' +
234
+        'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
235
+          .appendTo($('#searchbox'));
236
+    }
237
+  },
238
+
239
+  /**
240
+   * init the domain index toggle buttons
241
+   */
242
+  initIndexTable : function() {
243
+    var togglers = $('img.toggler').click(function() {
244
+      var src = $(this).attr('src');
245
+      var idnum = $(this).attr('id').substr(7);
246
+      $('tr.cg-' + idnum).toggle();
247
+      if (src.substr(-9) === 'minus.png')
248
+        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
249
+      else
250
+        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
251
+    }).css('display', '');
252
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
253
+        togglers.click();
254
+    }
255
+  },
256
+
257
+  /**
258
+   * helper function to hide the search marks again
259
+   */
260
+  hideSearchWords : function() {
261
+    $('#searchbox .highlight-link').fadeOut(300);
262
+    $('span.highlighted').removeClass('highlighted');
263
+  },
264
+
265
+  /**
266
+   * make the url absolute
267
+   */
268
+  makeURL : function(relativeURL) {
269
+    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
270
+  },
271
+
272
+  /**
273
+   * get the current relative url
274
+   */
275
+  getCurrentURL : function() {
276
+    var path = document.location.pathname;
277
+    var parts = path.split(/\//);
278
+    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
279
+      if (this === '..')
280
+        parts.pop();
281
+    });
282
+    var url = parts.join('/');
283
+    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
284
+  },
285
+
286
+  initOnKeyListeners: function() {
287
+    $(document).keyup(function(event) {
288
+      var activeElementType = document.activeElement.tagName;
289
+      // don't navigate when in search box or textarea
290
+      if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
291
+        switch (event.keyCode) {
292
+          case 37: // left
293
+            var prevHref = $('link[rel="prev"]').prop('href');
294
+            if (prevHref) {
295
+              window.location.href = prevHref;
296
+              return false;
297
+            }
298
+          case 39: // right
299
+            var nextHref = $('link[rel="next"]').prop('href');
300
+            if (nextHref) {
301
+              window.location.href = nextHref;
302
+              return false;
303
+            }
304
+        }
305
+      }
306
+    });
307
+  }
308
+};
309
+
310
+// quick alias for translations
311
+_ = Documentation.gettext;
312
+
313
+$(document).ready(function() {
314
+  Documentation.init();
315
+});

+ 10
- 0
_docs_/_static/documentation_options.js View File

@@ -0,0 +1,10 @@
1
+var DOCUMENTATION_OPTIONS = {
2
+    URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
3
+    VERSION: '',
4
+    LANGUAGE: 'None',
5
+    COLLAPSE_INDEX: false,
6
+    FILE_SUFFIX: '.html',
7
+    HAS_SOURCE: true,
8
+    SOURCELINK_SUFFIX: '.txt',
9
+    NAVIGATION_WITH_KEYS: false,
10
+};

BIN
_docs_/_static/file.png View File


BIN
_docs_/_static/fonts/FontAwesome.otf View File


BIN
_docs_/_static/fonts/Lato/lato-bold.eot View File


BIN
_docs_/_static/fonts/Lato/lato-bold.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-bold.woff View File


BIN
_docs_/_static/fonts/Lato/lato-bold.woff2 View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.eot View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.woff View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.woff2 View File


BIN
_docs_/_static/fonts/Lato/lato-italic.eot View File


BIN
_docs_/_static/fonts/Lato/lato-italic.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-italic.woff View File


BIN
_docs_/_static/fonts/Lato/lato-italic.woff2 View File


BIN
_docs_/_static/fonts/Lato/lato-regular.eot View File


BIN
_docs_/_static/fonts/Lato/lato-regular.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-regular.woff View File


BIN
_docs_/_static/fonts/Lato/lato-regular.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Bold.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Bold.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Light.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Light.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Regular.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Regular.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Thin.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Thin.woff2 View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 View File


BIN
_docs_/_static/fonts/fontawesome-webfont.eot View File


+ 2671
- 0
_docs_/_static/fonts/fontawesome-webfont.svg
File diff suppressed because it is too large
View File


BIN
_docs_/_static/fonts/fontawesome-webfont.ttf View File


BIN
_docs_/_static/fonts/fontawesome-webfont.woff View File


BIN
_docs_/_static/fonts/fontawesome-webfont.woff2 View File


BIN
_docs_/_static/fonts/lato-bold-italic.woff View File


BIN
_docs_/_static/fonts/lato-bold-italic.woff2 View File


BIN
_docs_/_static/fonts/lato-bold.woff View File


BIN
_docs_/_static/fonts/lato-bold.woff2 View File


BIN
_docs_/_static/fonts/lato-normal-italic.woff View File


BIN
_docs_/_static/fonts/lato-normal-italic.woff2 View File


BIN
_docs_/_static/fonts/lato-normal.woff View File


BIN
_docs_/_static/fonts/lato-normal.woff2 View File


+ 10365
- 0
_docs_/_static/jquery.js
File diff suppressed because it is too large
View File


+ 1
- 0
_docs_/_static/js/badge_only.js View File

@@ -0,0 +1 @@
1
+!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}});

+ 4
- 0
_docs_/_static/js/html5shiv-printshiv.min.js View File

@@ -0,0 +1,4 @@
1
+/**
2
+* @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3
+*/
4
+!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document);

+ 4
- 0
_docs_/_static/js/html5shiv.min.js View File

@@ -0,0 +1,4 @@
1
+/**
2
+* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3
+*/
4
+!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);

+ 4
- 0
_docs_/_static/js/modernizr.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
_docs_/_static/js/theme.js View File

@@ -0,0 +1 @@
1
+!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),n("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),n("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n('<span class="toctree-expand"></span>'),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}t.length>0&&($(".wy-menu-vertical .current").removeClass("current"),t.addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l1").parent().addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l2").addClass("current"),t.closest("li.toctree-l3").addClass("current"),t.closest("li.toctree-l4").addClass("current"),t.closest("li.toctree-l5").addClass("current"),t[0].scrollIntoView())}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var i=(new Date).getTime(),o=Math.max(0,16-(i-n)),r=window.setTimeout((function(){e(i+o)}),o);return n=i+o,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()}).call(window)},function(n,e){n.exports=jQuery},function(n,e,t){}]);

+ 297
- 0
_docs_/_static/language_data.js View File

@@ -0,0 +1,297 @@
1
+/*
2
+ * language_data.js
3
+ * ~~~~~~~~~~~~~~~~
4
+ *
5
+ * This script contains the language-specific data used by searchtools.js,
6
+ * namely the list of stopwords, stemmer, scorer and splitter.
7
+ *
8
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
9
+ * :license: BSD, see LICENSE for details.
10
+ *
11
+ */
12
+
13
+var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
14
+
15
+
16
+/* Non-minified version JS is _stemmer.js if file is provided */ 
17
+/**
18
+ * Porter Stemmer
19
+ */
20
+var Stemmer = function() {
21
+
22
+  var step2list = {
23
+    ational: 'ate',
24
+    tional: 'tion',
25
+    enci: 'ence',
26
+    anci: 'ance',
27
+    izer: 'ize',
28
+    bli: 'ble',
29
+    alli: 'al',
30
+    entli: 'ent',
31
+    eli: 'e',
32
+    ousli: 'ous',
33
+    ization: 'ize',
34
+    ation: 'ate',
35
+    ator: 'ate',
36
+    alism: 'al',
37
+    iveness: 'ive',
38
+    fulness: 'ful',
39
+    ousness: 'ous',
40
+    aliti: 'al',
41
+    iviti: 'ive',
42
+    biliti: 'ble',
43
+    logi: 'log'
44
+  };
45
+
46
+  var step3list = {
47
+    icate: 'ic',
48
+    ative: '',
49
+    alize: 'al',
50
+    iciti: 'ic',
51
+    ical: 'ic',
52
+    ful: '',
53
+    ness: ''
54
+  };
55
+
56
+  var c = "[^aeiou]";          // consonant
57
+  var v = "[aeiouy]";          // vowel
58
+  var C = c + "[^aeiouy]*";    // consonant sequence
59
+  var V = v + "[aeiou]*";      // vowel sequence
60
+
61
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
62
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
63
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
64
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
65
+
66
+  this.stemWord = function (w) {
67
+    var stem;
68
+    var suffix;
69
+    var firstch;
70
+    var origword = w;
71
+
72
+    if (w.length < 3)
73
+      return w;
74
+
75
+    var re;
76
+    var re2;
77
+    var re3;
78
+    var re4;
79
+
80
+    firstch = w.substr(0,1);
81
+    if (firstch == "y")
82
+      w = firstch.toUpperCase() + w.substr(1);
83
+
84
+    // Step 1a
85
+    re = /^(.+?)(ss|i)es$/;
86
+    re2 = /^(.+?)([^s])s$/;
87
+
88
+    if (re.test(w))
89
+      w = w.replace(re,"$1$2");
90
+    else if (re2.test(w))
91
+      w = w.replace(re2,"$1$2");
92
+
93
+    // Step 1b
94
+    re = /^(.+?)eed$/;
95
+    re2 = /^(.+?)(ed|ing)$/;
96
+    if (re.test(w)) {
97
+      var fp = re.exec(w);
98
+      re = new RegExp(mgr0);
99
+      if (re.test(fp[1])) {
100
+        re = /.$/;
101
+        w = w.replace(re,"");
102
+      }
103
+    }
104
+    else if (re2.test(w)) {
105
+      var fp = re2.exec(w);
106
+      stem = fp[1];
107
+      re2 = new RegExp(s_v);
108
+      if (re2.test(stem)) {
109
+        w = stem;
110
+        re2 = /(at|bl|iz)$/;
111
+        re3 = new RegExp("([^aeiouylsz])\\1$");
112
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
113
+        if (re2.test(w))
114
+          w = w + "e";
115
+        else if (re3.test(w)) {
116
+          re = /.$/;
117
+          w = w.replace(re,"");
118
+        }
119
+        else if (re4.test(w))
120
+          w = w + "e";
121
+      }
122
+    }
123
+
124
+    // Step 1c
125
+    re = /^(.+?)y$/;
126
+    if (re.test(w)) {
127
+      var fp = re.exec(w);
128
+      stem = fp[1];
129
+      re = new RegExp(s_v);
130
+      if (re.test(stem))
131
+        w = stem + "i";
132
+    }
133
+
134
+    // Step 2
135
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
136
+    if (re.test(w)) {
137
+      var fp = re.exec(w);
138
+      stem = fp[1];
139
+      suffix = fp[2];
140
+      re = new RegExp(mgr0);
141
+      if (re.test(stem))
142
+        w = stem + step2list[suffix];
143
+    }
144
+
145
+    // Step 3
146
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
147
+    if (re.test(w)) {
148
+      var fp = re.exec(w);
149
+      stem = fp[1];
150
+      suffix = fp[2];
151
+      re = new RegExp(mgr0);
152
+      if (re.test(stem))
153
+        w = stem + step3list[suffix];
154
+    }
155
+
156
+    // Step 4
157
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
158
+    re2 = /^(.+?)(s|t)(ion)$/;
159
+    if (re.test(w)) {
160
+      var fp = re.exec(w);
161
+      stem = fp[1];
162
+      re = new RegExp(mgr1);
163
+      if (re.test(stem))
164
+        w = stem;
165
+    }
166
+    else if (re2.test(w)) {
167
+      var fp = re2.exec(w);
168
+      stem = fp[1] + fp[2];
169
+      re2 = new RegExp(mgr1);
170
+      if (re2.test(stem))
171
+        w = stem;
172
+    }
173
+
174
+    // Step 5
175
+    re = /^(.+?)e$/;
176
+    if (re.test(w)) {
177
+      var fp = re.exec(w);
178
+      stem = fp[1];
179
+      re = new RegExp(mgr1);
180
+      re2 = new RegExp(meq1);
181
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
182
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
183
+        w = stem;
184
+    }
185
+    re = /ll$/;
186
+    re2 = new RegExp(mgr1);
187
+    if (re.test(w) && re2.test(w)) {
188
+      re = /.$/;
189
+      w = w.replace(re,"");
190
+    }
191
+
192
+    // and turn initial Y back to y
193
+    if (firstch == "y")
194
+      w = firstch.toLowerCase() + w.substr(1);
195
+    return w;
196
+  }
197
+}
198
+
199
+
200
+
201
+
202
+
203
+var splitChars = (function() {
204
+    var result = {};
205
+    var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
206
+         1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
207
+         2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
208
+         2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
209
+         3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
210
+         3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
211
+         4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
212
+         8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
213
+         11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
214
+         43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
215
+    var i, j, start, end;
216
+    for (i = 0; i < singles.length; i++) {
217
+        result[singles[i]] = true;
218
+    }
219
+    var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
220
+         [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
221
+         [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
222
+         [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
223
+         [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
224
+         [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
225
+         [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
226
+         [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
227
+         [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
228
+         [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
229
+         [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
230
+         [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
231
+         [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
232
+         [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
233
+         [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
234
+         [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
235
+         [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
236
+         [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
237
+         [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
238
+         [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
239
+         [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
240
+         [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
241
+         [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
242
+         [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
243
+         [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
244
+         [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
245
+         [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
246
+         [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
247
+         [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
248
+         [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
249
+         [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
250
+         [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
251
+         [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
252
+         [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
253
+         [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
254
+         [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
255
+         [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
256
+         [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
257
+         [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
258
+         [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
259
+         [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
260
+         [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
261
+         [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
262
+         [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
263
+         [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
264
+         [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
265
+         [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
266
+         [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
267
+         [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
268
+    for (i = 0; i < ranges.length; i++) {
269
+        start = ranges[i][0];
270
+        end = ranges[i][1];
271
+        for (j = start; j <= end; j++) {
272
+            result[j] = true;
273
+        }
274
+    }
275
+    return result;
276
+})();
277
+
278
+function splitQuery(query) {
279
+    var result = [];
280
+    var start = -1;
281
+    for (var i = 0; i < query.length; i++) {
282
+        if (splitChars[query.charCodeAt(i)]) {
283
+            if (start !== -1) {
284
+                result.push(query.slice(start, i));
285
+                start = -1;
286
+            }
287
+        } else if (start === -1) {
288
+            start = i;
289
+        }
290
+    }
291
+    if (start !== -1) {
292
+        result.push(query.slice(start));
293
+    }
294
+    return result;
295
+}
296
+
297
+

BIN
_docs_/_static/minus.png View File


BIN
_docs_/_static/plus.png View File


+ 69
- 0
_docs_/_static/pygments.css View File

@@ -0,0 +1,69 @@
1
+.highlight .hll { background-color: #ffffcc }
2
+.highlight  { background: #f8f8f8; }
3
+.highlight .c { color: #408080; font-style: italic } /* Comment */
4
+.highlight .err { border: 1px solid #FF0000 } /* Error */
5
+.highlight .k { color: #008000; font-weight: bold } /* Keyword */
6
+.highlight .o { color: #666666 } /* Operator */
7
+.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
8
+.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
9
+.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
10
+.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
11
+.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
12
+.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
13
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
14
+.highlight .ge { font-style: italic } /* Generic.Emph */
15
+.highlight .gr { color: #FF0000 } /* Generic.Error */
16
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
17
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
18
+.highlight .go { color: #888888 } /* Generic.Output */
19
+.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
20
+.highlight .gs { font-weight: bold } /* Generic.Strong */
21
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
22
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
23
+.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
24
+.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
25
+.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
26
+.highlight .kp { color: #008000 } /* Keyword.Pseudo */
27
+.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
28
+.highlight .kt { color: #B00040 } /* Keyword.Type */
29
+.highlight .m { color: #666666 } /* Literal.Number */
30
+.highlight .s { color: #BA2121 } /* Literal.String */
31
+.highlight .na { color: #7D9029 } /* Name.Attribute */
32
+.highlight .nb { color: #008000 } /* Name.Builtin */
33
+.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
34
+.highlight .no { color: #880000 } /* Name.Constant */
35
+.highlight .nd { color: #AA22FF } /* Name.Decorator */
36
+.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
37
+.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
38
+.highlight .nf { color: #0000FF } /* Name.Function */
39
+.highlight .nl { color: #A0A000 } /* Name.Label */
40
+.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
41
+.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
42
+.highlight .nv { color: #19177C } /* Name.Variable */
43
+.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
44
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
45
+.highlight .mb { color: #666666 } /* Literal.Number.Bin */
46
+.highlight .mf { color: #666666 } /* Literal.Number.Float */
47
+.highlight .mh { color: #666666 } /* Literal.Number.Hex */
48
+.highlight .mi { color: #666666 } /* Literal.Number.Integer */
49
+.highlight .mo { color: #666666 } /* Literal.Number.Oct */
50
+.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
51
+.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
52
+.highlight .sc { color: #BA2121 } /* Literal.String.Char */
53
+.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
54
+.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
55
+.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
56
+.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
57
+.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
58
+.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
59
+.highlight .sx { color: #008000 } /* Literal.String.Other */
60
+.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
61
+.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
62
+.highlight .ss { color: #19177C } /* Literal.String.Symbol */
63
+.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
64
+.highlight .fm { color: #0000FF } /* Name.Function.Magic */
65
+.highlight .vc { color: #19177C } /* Name.Variable.Class */
66
+.highlight .vg { color: #19177C } /* Name.Variable.Global */
67
+.highlight .vi { color: #19177C } /* Name.Variable.Instance */
68
+.highlight .vm { color: #19177C } /* Name.Variable.Magic */
69
+.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */

+ 481
- 0
_docs_/_static/searchtools.js View File

@@ -0,0 +1,481 @@
1
+/*
2
+ * searchtools.js
3
+ * ~~~~~~~~~~~~~~~~
4
+ *
5
+ * Sphinx JavaScript utilities for the full-text search.
6
+ *
7
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+if (!Scorer) {
13
+  /**
14
+   * Simple result scoring code.
15
+   */
16
+  var Scorer = {
17
+    // Implement the following function to further tweak the score for each result
18
+    // The function takes a result array [filename, title, anchor, descr, score]
19
+    // and returns the new score.
20
+    /*
21
+    score: function(result) {
22
+      return result[4];
23
+    },
24
+    */
25
+
26
+    // query matches the full name of an object
27
+    objNameMatch: 11,
28
+    // or matches in the last dotted part of the object name
29
+    objPartialMatch: 6,
30
+    // Additive scores depending on the priority of the object
31
+    objPrio: {0:  15,   // used to be importantResults
32
+              1:  5,   // used to be objectResults
33
+              2: -5},  // used to be unimportantResults
34
+    //  Used when the priority is not in the mapping.
35
+    objPrioDefault: 0,
36
+
37
+    // query found in title
38
+    title: 15,
39
+    // query found in terms
40
+    term: 5
41
+  };
42
+}
43
+
44
+if (!splitQuery) {
45
+  function splitQuery(query) {
46
+    return query.split(/\s+/);
47
+  }
48
+}
49
+
50
+/**
51
+ * Search Module
52
+ */
53
+var Search = {
54
+
55
+  _index : null,
56
+  _queued_query : null,
57
+  _pulse_status : -1,
58
+
59
+  init : function() {
60
+      var params = $.getQueryParameters();
61
+      if (params.q) {
62
+          var query = params.q[0];
63
+          $('input[name="q"]')[0].value = query;
64
+          this.performSearch(query);
65
+      }
66
+  },
67
+
68
+  loadIndex : function(url) {
69
+    $.ajax({type: "GET", url: url, data: null,
70
+            dataType: "script", cache: true,
71
+            complete: function(jqxhr, textstatus) {
72
+              if (textstatus != "success") {
73
+                document.getElementById("searchindexloader").src = url;
74
+              }
75
+            }});
76
+  },
77
+
78
+  setIndex : function(index) {
79
+    var q;
80
+    this._index = index;
81
+    if ((q = this._queued_query) !== null) {
82
+      this._queued_query = null;
83
+      Search.query(q);
84
+    }
85
+  },
86
+
87
+  hasIndex : function() {
88
+      return this._index !== null;
89
+  },
90
+
91
+  deferQuery : function(query) {
92
+      this._queued_query = query;
93
+  },
94
+
95
+  stopPulse : function() {
96
+      this._pulse_status = 0;
97
+  },
98
+
99
+  startPulse : function() {
100
+    if (this._pulse_status >= 0)
101
+        return;
102
+    function pulse() {
103
+      var i;
104
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
105
+      var dotString = '';
106
+      for (i = 0; i < Search._pulse_status; i++)
107
+        dotString += '.';
108
+      Search.dots.text(dotString);
109
+      if (Search._pulse_status > -1)
110
+        window.setTimeout(pulse, 500);
111
+    }
112
+    pulse();
113
+  },
114
+
115
+  /**
116
+   * perform a search for something (or wait until index is loaded)
117
+   */
118
+  performSearch : function(query) {
119
+    // create the required interface elements
120
+    this.out = $('#search-results');
121
+    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
122
+    this.dots = $('<span></span>').appendTo(this.title);
123
+    this.status = $('<p style="display: none"></p>').appendTo(this.out);
124
+    this.output = $('<ul class="search"/>').appendTo(this.out);
125
+
126
+    $('#search-progress').text(_('Preparing search...'));
127
+    this.startPulse();
128
+
129
+    // index already loaded, the browser was quick!
130
+    if (this.hasIndex())
131
+      this.query(query);
132
+    else
133
+      this.deferQuery(query);
134
+  },
135
+
136
+  /**
137
+   * execute search (requires search index to be loaded)
138
+   */
139
+  query : function(query) {
140
+    var i;
141
+
142
+    // stem the searchterms and add them to the correct list
143
+    var stemmer = new Stemmer();
144
+    var searchterms = [];
145
+    var excluded = [];
146
+    var hlterms = [];
147
+    var tmp = splitQuery(query);
148
+    var objectterms = [];
149
+    for (i = 0; i < tmp.length; i++) {
150
+      if (tmp[i] !== "") {
151
+          objectterms.push(tmp[i].toLowerCase());
152
+      }
153
+
154
+      if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
155
+          tmp[i] === "") {
156
+        // skip this "word"
157
+        continue;
158
+      }
159
+      // stem the word
160
+      var word = stemmer.stemWord(tmp[i].toLowerCase());
161
+      // prevent stemmer from cutting word smaller than two chars
162
+      if(word.length < 3 && tmp[i].length >= 3) {
163
+        word = tmp[i];
164
+      }
165
+      var toAppend;
166
+      // select the correct list
167
+      if (word[0] == '-') {
168
+        toAppend = excluded;
169
+        word = word.substr(1);
170
+      }
171
+      else {
172
+        toAppend = searchterms;
173
+        hlterms.push(tmp[i].toLowerCase());
174
+      }
175
+      // only add if not already in the list
176
+      if (!$u.contains(toAppend, word))
177
+        toAppend.push(word);
178
+    }
179
+    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
180
+
181
+    // console.debug('SEARCH: searching for:');
182
+    // console.info('required: ', searchterms);
183
+    // console.info('excluded: ', excluded);
184
+
185
+    // prepare search
186
+    var terms = this._index.terms;
187
+    var titleterms = this._index.titleterms;
188
+
189
+    // array of [filename, title, anchor, descr, score]
190
+    var results = [];
191
+    $('#search-progress').empty();
192
+
193
+    // lookup as object
194
+    for (i = 0; i < objectterms.length; i++) {
195
+      var others = [].concat(objectterms.slice(0, i),
196
+                             objectterms.slice(i+1, objectterms.length));
197
+      results = results.concat(this.performObjectSearch(objectterms[i], others));
198
+    }
199
+
200
+    // lookup as search terms in fulltext
201
+    results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
202
+
203
+    // let the scorer override scores with a custom scoring function
204
+    if (Scorer.score) {
205
+      for (i = 0; i < results.length; i++)
206
+        results[i][4] = Scorer.score(results[i]);
207
+    }
208
+
209
+    // now sort the results by score (in opposite order of appearance, since the
210
+    // display function below uses pop() to retrieve items) and then
211
+    // alphabetically
212
+    results.sort(function(a, b) {
213
+      var left = a[4];
214
+      var right = b[4];
215
+      if (left > right) {
216
+        return 1;
217
+      } else if (left < right) {
218
+        return -1;
219
+      } else {
220
+        // same score: sort alphabetically
221
+        left = a[1].toLowerCase();
222
+        right = b[1].toLowerCase();
223
+        return (left > right) ? -1 : ((left < right) ? 1 : 0);
224
+      }
225
+    });
226
+
227
+    // for debugging
228
+    //Search.lastresults = results.slice();  // a copy
229
+    //console.info('search results:', Search.lastresults);
230
+
231
+    // print the results
232
+    var resultCount = results.length;
233
+    function displayNextItem() {
234
+      // results left, load the summary and display it
235
+      if (results.length) {
236
+        var item = results.pop();
237
+        var listItem = $('<li style="display:none"></li>');
238
+        if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
239
+          // dirhtml builder
240
+          var dirname = item[0] + '/';
241
+          if (dirname.match(/\/index\/$/)) {
242
+            dirname = dirname.substring(0, dirname.length-6);
243
+          } else if (dirname == 'index/') {
244
+            dirname = '';
245
+          }
246
+          listItem.append($('<a/>').attr('href',
247
+            DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
248
+            highlightstring + item[2]).html(item[1]));
249
+        } else {
250
+          // normal html builders
251
+          listItem.append($('<a/>').attr('href',
252
+            item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
253
+            highlightstring + item[2]).html(item[1]));
254
+        }
255
+        if (item[3]) {
256
+          listItem.append($('<span> (' + item[3] + ')</span>'));
257
+          Search.output.append(listItem);
258
+          listItem.slideDown(5, function() {
259
+            displayNextItem();
260
+          });
261
+        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
262
+          var suffix = DOCUMENTATION_OPTIONS.SOURCELINK_SUFFIX;
263
+          if (suffix === undefined) {
264
+            suffix = '.txt';
265
+          }
266
+          $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[5] + (item[5].slice(-suffix.length) === suffix ? '' : suffix),
267
+                  dataType: "text",
268
+                  complete: function(jqxhr, textstatus) {
269
+                    var data = jqxhr.responseText;
270
+                    if (data !== '' && data !== undefined) {
271
+                      listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
272
+                    }
273
+                    Search.output.append(listItem);
274
+                    listItem.slideDown(5, function() {
275
+                      displayNextItem();
276
+                    });
277
+                  }});
278
+        } else {
279
+          // no source available, just display title
280
+          Search.output.append(listItem);
281
+          listItem.slideDown(5, function() {
282
+            displayNextItem();
283
+          });
284
+        }
285
+      }
286
+      // search finished, update title and status message
287
+      else {
288
+        Search.stopPulse();
289
+        Search.title.text(_('Search Results'));
290
+        if (!resultCount)
291
+          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
292
+        else
293
+            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
294
+        Search.status.fadeIn(500);
295
+      }
296
+    }
297
+    displayNextItem();
298
+  },
299
+
300
+  /**
301
+   * search for object names
302
+   */
303
+  performObjectSearch : function(object, otherterms) {
304
+    var filenames = this._index.filenames;
305
+    var docnames = this._index.docnames;
306
+    var objects = this._index.objects;
307
+    var objnames = this._index.objnames;
308
+    var titles = this._index.titles;
309
+
310
+    var i;
311
+    var results = [];
312
+
313
+    for (var prefix in objects) {
314
+      for (var name in objects[prefix]) {
315
+        var fullname = (prefix ? prefix + '.' : '') + name;
316
+        if (fullname.toLowerCase().indexOf(object) > -1) {
317
+          var score = 0;
318
+          var parts = fullname.split('.');
319
+          // check for different match types: exact matches of full name or
320
+          // "last name" (i.e. last dotted part)
321
+          if (fullname == object || parts[parts.length - 1] == object) {
322
+            score += Scorer.objNameMatch;
323
+          // matches in last name
324
+          } else if (parts[parts.length - 1].indexOf(object) > -1) {
325
+            score += Scorer.objPartialMatch;
326
+          }
327
+          var match = objects[prefix][name];
328
+          var objname = objnames[match[1]][2];
329
+          var title = titles[match[0]];
330
+          // If more than one term searched for, we require other words to be
331
+          // found in the name/title/description
332
+          if (otherterms.length > 0) {
333
+            var haystack = (prefix + ' ' + name + ' ' +
334
+                            objname + ' ' + title).toLowerCase();
335
+            var allfound = true;
336
+            for (i = 0; i < otherterms.length; i++) {
337
+              if (haystack.indexOf(otherterms[i]) == -1) {
338
+                allfound = false;
339
+                break;
340
+              }
341
+            }
342
+            if (!allfound) {
343
+              continue;
344
+            }
345
+          }
346
+          var descr = objname + _(', in ') + title;
347
+
348
+          var anchor = match[3];
349
+          if (anchor === '')
350
+            anchor = fullname;
351
+          else if (anchor == '-')
352
+            anchor = objnames[match[1]][1] + '-' + fullname;
353
+          // add custom score for some objects according to scorer
354
+          if (Scorer.objPrio.hasOwnProperty(match[2])) {
355
+            score += Scorer.objPrio[match[2]];
356
+          } else {
357
+            score += Scorer.objPrioDefault;
358
+          }
359
+          results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
360
+        }
361
+      }
362
+    }
363
+
364
+    return results;
365
+  },
366
+
367
+  /**
368
+   * search for full-text terms in the index
369
+   */
370
+  performTermsSearch : function(searchterms, excluded, terms, titleterms) {
371
+    var docnames = this._index.docnames;
372
+    var filenames = this._index.filenames;
373
+    var titles = this._index.titles;
374
+
375
+    var i, j, file;
376
+    var fileMap = {};
377
+    var scoreMap = {};
378
+    var results = [];
379
+
380
+    // perform the search on the required terms
381
+    for (i = 0; i < searchterms.length; i++) {
382
+      var word = searchterms[i];
383
+      var files = [];
384
+      var _o = [
385
+        {files: terms[word], score: Scorer.term},
386
+        {files: titleterms[word], score: Scorer.title}
387
+      ];
388
+
389
+      // no match but word was a required one
390
+      if ($u.every(_o, function(o){return o.files === undefined;})) {
391
+        break;
392
+      }
393
+      // found search word in contents
394
+      $u.each(_o, function(o) {
395
+        var _files = o.files;
396
+        if (_files === undefined)
397
+          return
398
+
399
+        if (_files.length === undefined)
400
+          _files = [_files];
401
+        files = files.concat(_files);
402
+
403
+        // set score for the word in each file to Scorer.term
404
+        for (j = 0; j < _files.length; j++) {
405
+          file = _files[j];
406
+          if (!(file in scoreMap))
407
+            scoreMap[file] = {}
408
+          scoreMap[file][word] = o.score;
409
+        }
410
+      });
411
+
412
+      // create the mapping
413
+      for (j = 0; j < files.length; j++) {
414
+        file = files[j];
415
+        if (file in fileMap)
416
+          fileMap[file].push(word);
417
+        else
418
+          fileMap[file] = [word];
419
+      }
420
+    }
421
+
422
+    // now check if the files don't contain excluded terms
423
+    for (file in fileMap) {
424
+      var valid = true;
425
+
426
+      // check if all requirements are matched
427
+      if (fileMap[file].length != searchterms.length)
428
+          continue;
429
+
430
+      // ensure that none of the excluded terms is in the search result
431
+      for (i = 0; i < excluded.length; i++) {
432
+        if (terms[excluded[i]] == file ||
433
+            titleterms[excluded[i]] == file ||
434
+            $u.contains(terms[excluded[i]] || [], file) ||
435
+            $u.contains(titleterms[excluded[i]] || [], file)) {
436
+          valid = false;
437
+          break;
438
+        }
439
+      }
440
+
441
+      // if we have still a valid result we can add it to the result list
442
+      if (valid) {
443
+        // select one (max) score for the file.
444
+        // for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
445
+        var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
446
+        results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
447
+      }
448
+    }
449
+    return results;
450
+  },
451
+
452
+  /**
453
+   * helper function to return a node containing the
454
+   * search summary for a given text. keywords is a list
455
+   * of stemmed words, hlwords is the list of normal, unstemmed
456
+   * words. the first one is used to find the occurrence, the
457
+   * latter for highlighting it.
458
+   */
459
+  makeSearchSummary : function(text, keywords, hlwords) {
460
+    var textLower = text.toLowerCase();
461
+    var start = 0;
462
+    $.each(keywords, function() {
463
+      var i = textLower.indexOf(this.toLowerCase());
464
+      if (i > -1)
465
+        start = i;
466
+    });
467
+    start = Math.max(start - 120, 0);
468
+    var excerpt = ((start > 0) ? '...' : '') +
469
+      $.trim(text.substr(start, 240)) +
470
+      ((start + 240 - text.length) ? '...' : '');
471
+    var rv = $('<div class="context"></div>').text(excerpt);
472
+    $.each(hlwords, function() {
473
+      rv = rv.highlightText(this, 'highlighted');
474
+    });
475
+    return rv;
476
+  }
477
+};
478
+
479
+$(document).ready(function() {
480
+  Search.init();
481
+});

+ 1692
- 0
_docs_/_static/underscore.js
File diff suppressed because it is too large
View File


+ 333
- 0
_docs_/genindex.html View File

@@ -0,0 +1,333 @@
1
+
2
+
3
+
4
+<!DOCTYPE html>
5
+<html class="writer-html4" lang="en" >
6
+<head>
7
+  <meta charset="utf-8">
8
+  
9
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
+  
11
+  <title>Index &mdash; task  documentation</title>
12
+  
13
+
14
+  
15
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
16
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
17
+
18
+  
19
+  
20
+  
21
+  
22
+
23
+  
24
+  <!--[if lt IE 9]>
25
+    <script src="_static/js/html5shiv.min.js"></script>
26
+  <![endif]-->
27
+  
28
+    
29
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
30
+        <script type="text/javascript" src="_static/jquery.js"></script>
31
+        <script type="text/javascript" src="_static/underscore.js"></script>
32
+        <script type="text/javascript" src="_static/doctools.js"></script>
33
+        <script type="text/javascript" src="_static/language_data.js"></script>
34
+    
35
+    <script type="text/javascript" src="_static/js/theme.js"></script>
36
+
37
+    
38
+    <link rel="index" title="Index" href="#" />
39
+    <link rel="search" title="Search" href="search.html" /> 
40
+</head>
41
+
42
+<body class="wy-body-for-nav">
43
+
44
+   
45
+  <div class="wy-grid-for-nav">
46
+    
47
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
48
+      <div class="wy-side-scroll">
49
+        <div class="wy-side-nav-search" >
50
+          
51
+
52
+          
53
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> task
54
+          
55
+
56
+          
57
+          </a>
58
+
59
+          
60
+            
61
+            
62
+          
63
+
64
+          
65
+<div role="search">
66
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
67
+    <input type="text" name="q" placeholder="Search docs" />
68
+    <input type="hidden" name="check_keywords" value="yes" />
69
+    <input type="hidden" name="area" value="default" />
70
+  </form>
71
+</div>
72
+
73
+          
74
+        </div>
75
+
76
+        
77
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
78
+          
79
+            
80
+            
81
+              
82
+            
83
+            
84
+              <!-- Local TOC -->
85
+              <div class="local-toc"></div>
86
+            
87
+          
88
+        </div>
89
+        
90
+      </div>
91
+    </nav>
92
+
93
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
94
+
95
+      
96
+      <nav class="wy-nav-top" aria-label="top navigation">
97
+        
98
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
99
+          <a href="index.html">task</a>
100
+        
101
+      </nav>
102
+
103
+
104
+      <div class="wy-nav-content">
105
+        
106
+        <div class="rst-content">
107
+        
108
+          
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+<div role="navigation" aria-label="breadcrumbs navigation">
125
+
126
+  <ul class="wy-breadcrumbs">
127
+    
128
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
129
+        
130
+      <li>Index</li>
131
+    
132
+    
133
+      <li class="wy-breadcrumbs-aside">
134
+        
135
+            
136
+        
137
+      </li>
138
+    
139
+  </ul>
140
+
141
+  
142
+  <hr/>
143
+</div>
144
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
145
+           <div itemprop="articleBody">
146
+            
147
+
148
+<h1 id="index">Index</h1>
149
+
150
+<div class="genindex-jumpbox">
151
+ <a href="#A"><strong>A</strong></a>
152
+ | <a href="#C"><strong>C</strong></a>
153
+ | <a href="#D"><strong>D</strong></a>
154
+ | <a href="#E"><strong>E</strong></a>
155
+ | <a href="#J"><strong>J</strong></a>
156
+ | <a href="#P"><strong>P</strong></a>
157
+ | <a href="#Q"><strong>Q</strong></a>
158
+ | <a href="#R"><strong>R</strong></a>
159
+ | <a href="#S"><strong>S</strong></a>
160
+ | <a href="#T"><strong>T</strong></a>
161
+ 
162
+</div>
163
+<h2 id="A">A</h2>
164
+<table style="width: 100%" class="indextable genindextable"><tr>
165
+  <td style="width: 33%; vertical-align: top;"><ul>
166
+      <li><a href="index.html#task.crontab.add_cronjob">add_cronjob() (task.crontab method)</a>
167
+</li>
168
+  </ul></td>
169
+  <td style="width: 33%; vertical-align: top;"><ul>
170
+      <li><a href="index.html#task.crontab.ANY">ANY (task.crontab attribute)</a>
171
+</li>
172
+  </ul></td>
173
+</tr></table>
174
+
175
+<h2 id="C">C</h2>
176
+<table style="width: 100%" class="indextable genindextable"><tr>
177
+  <td style="width: 33%; vertical-align: top;"><ul>
178
+      <li><a href="index.html#task.queue.clean_queue">clean_queue() (task.queue method)</a>
179
+</li>
180
+      <li><a href="index.html#task.crontab.cronjob.cron_execution">cron_execution() (task.crontab.cronjob method)</a>
181
+</li>
182
+  </ul></td>
183
+  <td style="width: 33%; vertical-align: top;"><ul>
184
+      <li><a href="index.html#task.crontab">crontab (class in task)</a>
185
+</li>
186
+      <li><a href="index.html#task.crontab.cronjob">crontab.cronjob (class in task)</a>
187
+</li>
188
+      <li><a href="index.html#task.crontab.cronjob.all_match">crontab.cronjob.all_match (class in task)</a>
189
+</li>
190
+  </ul></td>
191
+</tr></table>
192
+
193
+<h2 id="D">D</h2>
194
+<table style="width: 100%" class="indextable genindextable"><tr>
195
+  <td style="width: 33%; vertical-align: top;"><ul>
196
+      <li><a href="index.html#task.delayed">delayed (class in task)</a>
197
+</li>
198
+  </ul></td>
199
+</tr></table>
200
+
201
+<h2 id="E">E</h2>
202
+<table style="width: 100%" class="indextable genindextable"><tr>
203
+  <td style="width: 33%; vertical-align: top;"><ul>
204
+      <li><a href="index.html#task.queue.enqueue">enqueue() (task.queue method)</a>
205
+</li>
206
+  </ul></td>
207
+  <td style="width: 33%; vertical-align: top;"><ul>
208
+      <li><a href="index.html#task.queue.expire">expire() (task.queue method)</a>
209
+</li>
210
+  </ul></td>
211
+</tr></table>
212
+
213
+<h2 id="J">J</h2>
214
+<table style="width: 100%" class="indextable genindextable"><tr>
215
+  <td style="width: 33%; vertical-align: top;"><ul>
216
+      <li><a href="index.html#task.periodic.join">join() (task.periodic method)</a>
217
+
218
+      <ul>
219
+        <li><a href="index.html#task.threaded_queue.join">(task.threaded_queue method)</a>
220
+</li>
221
+      </ul></li>
222
+  </ul></td>
223
+</tr></table>
224
+
225
+<h2 id="P">P</h2>
226
+<table style="width: 100%" class="indextable genindextable"><tr>
227
+  <td style="width: 33%; vertical-align: top;"><ul>
228
+      <li><a href="index.html#task.periodic">periodic (class in task)</a>
229
+</li>
230
+  </ul></td>
231
+</tr></table>
232
+
233
+<h2 id="Q">Q</h2>
234
+<table style="width: 100%" class="indextable genindextable"><tr>
235
+  <td style="width: 33%; vertical-align: top;"><ul>
236
+      <li><a href="index.html#task.queue">queue (class in task)</a>
237
+</li>
238
+  </ul></td>
239
+</tr></table>
240
+
241
+<h2 id="R">R</h2>
242
+<table style="width: 100%" class="indextable genindextable"><tr>
243
+  <td style="width: 33%; vertical-align: top;"><ul>
244
+      <li><a href="index.html#task.delayed.run">run() (task.delayed method)</a>
245
+
246
+      <ul>
247
+        <li><a href="index.html#task.periodic.run">(task.periodic method)</a>
248
+</li>
249
+        <li><a href="index.html#task.queue.run">(task.queue method)</a>
250
+</li>
251
+        <li><a href="index.html#task.threaded_queue.run">(task.threaded_queue method)</a>
252
+</li>
253
+      </ul></li>
254
+  </ul></td>
255
+</tr></table>
256
+
257
+<h2 id="S">S</h2>
258
+<table style="width: 100%" class="indextable genindextable"><tr>
259
+  <td style="width: 33%; vertical-align: top;"><ul>
260
+      <li><a href="index.html#task.crontab.cronjob.set_trigger_conditions">set_trigger_conditions() (task.crontab.cronjob method)</a>
261
+</li>
262
+      <li><a href="index.html#task.periodic.stop">stop() (task.periodic method)</a>
263
+
264
+      <ul>
265
+        <li><a href="index.html#task.queue.stop">(task.queue method)</a>
266
+</li>
267
+        <li><a href="index.html#task.threaded_queue.stop">(task.threaded_queue method)</a>
268
+</li>
269
+      </ul></li>
270
+  </ul></td>
271
+</tr></table>
272
+
273
+<h2 id="T">T</h2>
274
+<table style="width: 100%" class="indextable genindextable"><tr>
275
+  <td style="width: 33%; vertical-align: top;"><ul>
276
+      <li><a href="index.html#module-task">task (module)</a>
277
+</li>
278
+  </ul></td>
279
+  <td style="width: 33%; vertical-align: top;"><ul>
280
+      <li><a href="index.html#task.threaded_queue">threaded_queue (class in task)</a>
281
+</li>
282
+  </ul></td>
283
+</tr></table>
284
+
285
+
286
+
287
+           </div>
288
+           
289
+          </div>
290
+          <footer>
291
+  
292
+
293
+  <hr/>
294
+
295
+  <div role="contentinfo">
296
+    <p>
297
+        
298
+        &copy; Copyright 2021, Dirk Alders
299
+
300
+    </p>
301
+  </div>
302
+    
303
+    
304
+    
305
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
306
+    
307
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
308
+    
309
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
310
+
311
+</footer>
312
+
313
+        </div>
314
+      </div>
315
+
316
+    </section>
317
+
318
+  </div>
319
+  
320
+
321
+  <script type="text/javascript">
322
+      jQuery(function () {
323
+          SphinxRtdTheme.Navigation.enable(true);
324
+      });
325
+  </script>
326
+
327
+  
328
+  
329
+    
330
+   
331
+
332
+</body>
333
+</html>

+ 743
- 0
_docs_/index.html View File

@@ -0,0 +1,743 @@
1
+
2
+
3
+<!DOCTYPE html>
4
+<html class="writer-html4" lang="en" >
5
+<head>
6
+  <meta charset="utf-8">
7
+  
8
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+  
10
+  <title>Welcome to task’s documentation! &mdash; task  documentation</title>
11
+  
12
+
13
+  
14
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
15
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
16
+
17
+  
18
+  
19
+  
20
+  
21
+
22
+  
23
+  <!--[if lt IE 9]>
24
+    <script src="_static/js/html5shiv.min.js"></script>
25
+  <![endif]-->
26
+  
27
+    
28
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
29
+        <script type="text/javascript" src="_static/jquery.js"></script>
30
+        <script type="text/javascript" src="_static/underscore.js"></script>
31
+        <script type="text/javascript" src="_static/doctools.js"></script>
32
+        <script type="text/javascript" src="_static/language_data.js"></script>
33
+    
34
+    <script type="text/javascript" src="_static/js/theme.js"></script>
35
+
36
+    
37
+    <link rel="index" title="Index" href="genindex.html" />
38
+    <link rel="search" title="Search" href="search.html" /> 
39
+</head>
40
+
41
+<body class="wy-body-for-nav">
42
+
43
+   
44
+  <div class="wy-grid-for-nav">
45
+    
46
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
47
+      <div class="wy-side-scroll">
48
+        <div class="wy-side-nav-search" >
49
+          
50
+
51
+          
52
+            <a href="#" class="icon icon-home" alt="Documentation Home"> task
53
+          
54
+
55
+          
56
+          </a>
57
+
58
+          
59
+            
60
+            
61
+          
62
+
63
+          
64
+<div role="search">
65
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
66
+    <input type="text" name="q" placeholder="Search docs" />
67
+    <input type="hidden" name="check_keywords" value="yes" />
68
+    <input type="hidden" name="area" value="default" />
69
+  </form>
70
+</div>
71
+
72
+          
73
+        </div>
74
+
75
+        
76
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
77
+          
78
+            
79
+            
80
+              
81
+            
82
+            
83
+              <!-- Local TOC -->
84
+              <div class="local-toc"><ul>
85
+<li><a class="reference internal" href="#">Welcome to task’s documentation!</a><ul>
86
+<li><a class="reference internal" href="#task-task-module">task (Task Module)</a></li>
87
+</ul>
88
+</li>
89
+<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
90
+</ul>
91
+</div>
92
+            
93
+          
94
+        </div>
95
+        
96
+      </div>
97
+    </nav>
98
+
99
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
100
+
101
+      
102
+      <nav class="wy-nav-top" aria-label="top navigation">
103
+        
104
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
105
+          <a href="#">task</a>
106
+        
107
+      </nav>
108
+
109
+
110
+      <div class="wy-nav-content">
111
+        
112
+        <div class="rst-content">
113
+        
114
+          
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+<div role="navigation" aria-label="breadcrumbs navigation">
131
+
132
+  <ul class="wy-breadcrumbs">
133
+    
134
+      <li><a href="#" class="icon icon-home"></a> &raquo;</li>
135
+        
136
+      <li>Welcome to task’s documentation!</li>
137
+    
138
+    
139
+      <li class="wy-breadcrumbs-aside">
140
+        
141
+            
142
+            <a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
143
+          
144
+        
145
+      </li>
146
+    
147
+  </ul>
148
+
149
+  
150
+  <hr/>
151
+</div>
152
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
153
+           <div itemprop="articleBody">
154
+            
155
+  <div class="section" id="module-task">
156
+<span id="welcome-to-task-s-documentation"></span><h1>Welcome to task’s documentation!<a class="headerlink" href="#module-task" title="Permalink to this headline">¶</a></h1>
157
+<div class="section" id="task-task-module">
158
+<h2>task (Task Module)<a class="headerlink" href="#task-task-module" title="Permalink to this headline">¶</a></h2>
159
+<p><strong>Author:</strong></p>
160
+<ul class="simple">
161
+<li>Dirk Alders &lt;<a class="reference external" href="mailto:sudo-dirk&#37;&#52;&#48;mount-mockery&#46;de">sudo-dirk<span>&#64;</span>mount-mockery<span>&#46;</span>de</a>&gt;</li>
162
+</ul>
163
+<p><strong>Description:</strong></p>
164
+<blockquote>
165
+<div>This Module supports helpfull classes for queues, tasks, …</div></blockquote>
166
+<p><strong>Submodules:</strong></p>
167
+<ul class="simple">
168
+<li><a class="reference internal" href="#task.crontab" title="task.crontab"><code class="xref py py-class docutils literal notranslate"><span class="pre">task.crontab</span></code></a></li>
169
+<li><a class="reference internal" href="#task.delayed" title="task.delayed"><code class="xref py py-class docutils literal notranslate"><span class="pre">task.delayed</span></code></a></li>
170
+<li><a class="reference internal" href="#task.periodic" title="task.periodic"><code class="xref py py-class docutils literal notranslate"><span class="pre">task.periodic</span></code></a></li>
171
+<li><a class="reference internal" href="#task.queue" title="task.queue"><code class="xref py py-class docutils literal notranslate"><span class="pre">task.queue</span></code></a></li>
172
+<li><a class="reference internal" href="#task.threaded_queue" title="task.threaded_queue"><code class="xref py py-class docutils literal notranslate"><span class="pre">task.threaded_queue</span></code></a></li>
173
+</ul>
174
+<p><strong>Unittest:</strong></p>
175
+<blockquote>
176
+<div>See also the <a class="reference download internal" download="" href="_downloads/89eb74c94e7790229553fd55e6dfe3a3/unittest.pdf"><code class="xref download docutils literal notranslate"><span class="pre">unittest</span></code></a> documentation.</div></blockquote>
177
+<p><strong>Module Documentation:</strong></p>
178
+<dl class="class">
179
+<dt id="task.crontab">
180
+<em class="property">class </em><code class="descclassname">task.</code><code class="descname">crontab</code><span class="sig-paren">(</span><em>accuracy=30</em><span class="sig-paren">)</span><a class="headerlink" href="#task.crontab" title="Permalink to this definition">¶</a></dt>
181
+<dd><p>Class to execute a callback at the specified time conditions. See also parent <a class="reference internal" href="#task.periodic" title="task.periodic"><code class="xref py py-class docutils literal notranslate"><span class="pre">periodic</span></code></a>.</p>
182
+<table class="docutils field-list" frame="void" rules="none">
183
+<col class="field-name" />
184
+<col class="field-body" />
185
+<tbody valign="top">
186
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>accuracy</strong> (<em>float</em>) – Repeat time in seconds for background task checking event triggering. This time is the maximum delay between specified time condition and the execution.</td>
187
+</tr>
188
+</tbody>
189
+</table>
190
+<p><strong>Example:</strong></p>
191
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env python</span>
192
+<span class="c1"># -*- coding: UTF-8 -*-</span>
193
+
194
+<span class="kn">import</span> <span class="nn">sys</span>
195
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../..&#39;</span><span class="p">)</span>
196
+<span class="kn">import</span> <span class="nn">task</span>
197
+<span class="kn">import</span> <span class="nn">time</span>
198
+
199
+
200
+<span class="k">def</span> <span class="nf">print_localtime</span><span class="p">(</span><span class="n">cj</span><span class="p">):</span>
201
+    <span class="nb">print</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">localtime</span><span class="p">())</span>
202
+
203
+
204
+<span class="n">ct</span> <span class="o">=</span> <span class="n">task</span><span class="o">.</span><span class="n">crontab</span><span class="p">(</span><span class="n">accuracy</span><span class="o">=</span><span class="mi">7</span><span class="p">)</span>
205
+<span class="n">minute</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;%M&#39;</span><span class="p">))</span>
206
+<span class="n">ct</span><span class="o">.</span><span class="n">add_cronjob</span><span class="p">([</span><span class="n">minute</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="n">minute</span> <span class="o">+</span> <span class="mi">3</span><span class="p">],</span> <span class="n">task</span><span class="o">.</span><span class="n">crontab</span><span class="o">.</span><span class="n">ANY</span><span class="p">,</span> <span class="n">task</span><span class="o">.</span><span class="n">crontab</span><span class="o">.</span><span class="n">ANY</span><span class="p">,</span> <span class="n">task</span><span class="o">.</span><span class="n">crontab</span><span class="o">.</span><span class="n">ANY</span><span class="p">,</span> <span class="n">task</span><span class="o">.</span><span class="n">crontab</span><span class="o">.</span><span class="n">ANY</span><span class="p">,</span> <span class="n">print_localtime</span><span class="p">)</span>
207
+<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Cronjob added for Minute: </span><span class="si">%02d</span><span class="s1">, </span><span class="si">%02d</span><span class="se">\n</span><span class="s1">--------------------------------</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">minute</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="n">minute</span> <span class="o">+</span> <span class="mi">3</span><span class="p">))</span>
208
+<span class="n">ct</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
209
+<span class="k">try</span><span class="p">:</span>
210
+    <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">195</span><span class="p">)</span>
211
+    <span class="n">ct</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>
212
+    <span class="n">ct</span><span class="o">.</span><span class="n">join</span><span class="p">()</span>
213
+<span class="k">finally</span><span class="p">:</span>
214
+    <span class="n">ct</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>
215
+</pre></div>
216
+</div>
217
+<p>Will result to the following output:</p>
218
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Cronjob</span> <span class="n">added</span> <span class="k">for</span> <span class="n">Minute</span><span class="p">:</span> <span class="mi">45</span><span class="p">,</span> <span class="mi">47</span>
219
+<span class="o">--------------------------------</span>
220
+
221
+<span class="n">time</span><span class="o">.</span><span class="n">struct_time</span><span class="p">(</span><span class="n">tm_year</span><span class="o">=</span><span class="mi">2021</span><span class="p">,</span> <span class="n">tm_mon</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">tm_mday</span><span class="o">=</span><span class="mi">7</span><span class="p">,</span> <span class="n">tm_hour</span><span class="o">=</span><span class="mi">17</span><span class="p">,</span> <span class="n">tm_min</span><span class="o">=</span><span class="mi">45</span><span class="p">,</span> <span class="n">tm_sec</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">tm_wday</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">tm_yday</span><span class="o">=</span><span class="mi">7</span><span class="p">,</span> <span class="n">tm_isdst</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
222
+<span class="n">time</span><span class="o">.</span><span class="n">struct_time</span><span class="p">(</span><span class="n">tm_year</span><span class="o">=</span><span class="mi">2021</span><span class="p">,</span> <span class="n">tm_mon</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">tm_mday</span><span class="o">=</span><span class="mi">7</span><span class="p">,</span> <span class="n">tm_hour</span><span class="o">=</span><span class="mi">17</span><span class="p">,</span> <span class="n">tm_min</span><span class="o">=</span><span class="mi">47</span><span class="p">,</span> <span class="n">tm_sec</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">tm_wday</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">tm_yday</span><span class="o">=</span><span class="mi">7</span><span class="p">,</span> <span class="n">tm_isdst</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
223
+</pre></div>
224
+</div>
225
+<dl class="attribute">
226
+<dt id="task.crontab.ANY">
227
+<code class="descname">ANY</code><em class="property"> = '*'</em><a class="headerlink" href="#task.crontab.ANY" title="Permalink to this definition">¶</a></dt>
228
+<dd><p>Constant for matching every condition.</p>
229
+</dd></dl>
230
+
231
+<dl class="method">
232
+<dt id="task.crontab.add_cronjob">
233
+<code class="descname">add_cronjob</code><span class="sig-paren">(</span><em>minute</em>, <em>hour</em>, <em>day_of_month</em>, <em>month</em>, <em>day_of_week</em>, <em>callback</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#task.crontab.add_cronjob" title="Permalink to this definition">¶</a></dt>
234
+<dd><p>This Method adds a cronjob to be executed.</p>
235
+<table class="docutils field-list" frame="void" rules="none">
236
+<col class="field-name" />
237
+<col class="field-body" />
238
+<tbody valign="top">
239
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
240
+<li><strong>minute</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Minute for execution. Either 0…59, [0…59, 0…59, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Minute.</li>
241
+<li><strong>hour</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Hour for execution. Either 0…23, [0…23, 0…23, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Hour.</li>
242
+<li><strong>day_of_month</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Day of Month for execution. Either 0…31, [0…31, 0…31, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Day of Month.</li>
243
+<li><strong>month</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Month for execution. Either 0…12, [0…12, 0…12, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Month.</li>
244
+<li><strong>day_of_week</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Day of Week for execution. Either 0…6, [0…6, 0…6, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Day of Week.</li>
245
+<li><strong>callback</strong> (<em>func</em>) – The callback to be executed. The instance of <a class="reference internal" href="#task.crontab.cronjob" title="task.crontab.cronjob"><code class="xref py py-class docutils literal notranslate"><span class="pre">cronjob</span></code></a> will be given as the first, args and kwargs as the following parameters.</li>
246
+</ul>
247
+</td>
248
+</tr>
249
+</tbody>
250
+</table>
251
+<div class="admonition note">
252
+<p class="first admonition-title">Note</p>
253
+<p class="last">The <code class="docutils literal notranslate"><span class="pre">callback</span></code> will be executed with it’s instance of <a class="reference internal" href="#task.crontab.cronjob" title="task.crontab.cronjob"><code class="xref py py-class docutils literal notranslate"><span class="pre">cronjob</span></code></a> as the first parameter.
254
+The given Arguments (<code class="xref py py-data docutils literal notranslate"><span class="pre">args</span></code>) and keyword Arguments (<code class="xref py py-data docutils literal notranslate"><span class="pre">kwargs</span></code>) will be stored in that object.</p>
255
+</div>
256
+</dd></dl>
257
+
258
+<dl class="class">
259
+<dt id="task.crontab.cronjob">
260
+<em class="property">class </em><code class="descname">cronjob</code><span class="sig-paren">(</span><em>minute</em>, <em>hour</em>, <em>day_of_month</em>, <em>month</em>, <em>day_of_week</em>, <em>callback</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#task.crontab.cronjob" title="Permalink to this definition">¶</a></dt>
261
+<dd><p>Class to handle cronjob parameters and cronjob changes.</p>
262
+<table class="docutils field-list" frame="void" rules="none">
263
+<col class="field-name" />
264
+<col class="field-body" />
265
+<tbody valign="top">
266
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
267
+<li><strong>minute</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Minute for execution. Either 0…59, [0…59, 0…59, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Minute.</li>
268
+<li><strong>hour</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Hour for execution. Either 0…23, [0…23, 0…23, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Hour.</li>
269
+<li><strong>day_of_month</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Day of Month for execution. Either 0…31, [0…31, 0…31, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Day of Month.</li>
270
+<li><strong>month</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Month for execution. Either 0…12, [0…12, 0…12, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Month.</li>
271
+<li><strong>day_of_week</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Day of Week for execution. Either 0…6, [0…6, 0…6, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Day of Week.</li>
272
+<li><strong>callback</strong> (<em>func</em>) – The callback to be executed. The instance of <code class="xref py py-class docutils literal notranslate"><span class="pre">cronjob</span></code> will be given as the first, args and kwargs as the following parameters.</li>
273
+</ul>
274
+</td>
275
+</tr>
276
+</tbody>
277
+</table>
278
+<div class="admonition note">
279
+<p class="first admonition-title">Note</p>
280
+<p class="last">This class should not be used stand alone. An instance will be created by adding a cronjob by using <a class="reference internal" href="#task.crontab.add_cronjob" title="task.crontab.add_cronjob"><code class="xref py py-func docutils literal notranslate"><span class="pre">crontab.add_cronjob()</span></code></a>.</p>
281
+</div>
282
+<dl class="class">
283
+<dt id="task.crontab.cronjob.all_match">
284
+<em class="property">class </em><code class="descname">all_match</code><a class="headerlink" href="#task.crontab.cronjob.all_match" title="Permalink to this definition">¶</a></dt>
285
+<dd><p>Universal set - match everything</p>
286
+</dd></dl>
287
+
288
+<dl class="method">
289
+<dt id="task.crontab.cronjob.cron_execution">
290
+<code class="descname">cron_execution</code><span class="sig-paren">(</span><em>tm</em><span class="sig-paren">)</span><a class="headerlink" href="#task.crontab.cronjob.cron_execution" title="Permalink to this definition">¶</a></dt>
291
+<dd><p>This Methods executes the Cron-Callback, if a execution is needed for the given time (depending on the parameters on initialisation)</p>
292
+<table class="docutils field-list" frame="void" rules="none">
293
+<col class="field-name" />
294
+<col class="field-body" />
295
+<tbody valign="top">
296
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>tm</strong> (<em>int</em>) – (Current) Time Value to be checked. The time needs to be given in seconds since 1970 (e.g. generated by int(time.time())).</td>
297
+</tr>
298
+</tbody>
299
+</table>
300
+</dd></dl>
301
+
302
+<dl class="method">
303
+<dt id="task.crontab.cronjob.set_trigger_conditions">
304
+<code class="descname">set_trigger_conditions</code><span class="sig-paren">(</span><em>minute=None</em>, <em>hour=None</em>, <em>day_of_month=None</em>, <em>month=None</em>, <em>day_of_week=None</em><span class="sig-paren">)</span><a class="headerlink" href="#task.crontab.cronjob.set_trigger_conditions" title="Permalink to this definition">¶</a></dt>
305
+<dd><p>This Method changes the execution parameters.</p>
306
+<table class="docutils field-list" frame="void" rules="none">
307
+<col class="field-name" />
308
+<col class="field-body" />
309
+<tbody valign="top">
310
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
311
+<li><strong>minute</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Minute for execution. Either 0…59, [0…59, 0…59, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Minute.</li>
312
+<li><strong>hour</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Hour for execution. Either 0…23, [0…23, 0…23, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Hour.</li>
313
+<li><strong>day_of_month</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Day of Month for execution. Either 0…31, [0…31, 0…31, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Day of Month.</li>
314
+<li><strong>month</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Month for execution. Either 0…12, [0…12, 0…12, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Month.</li>
315
+<li><strong>day_of_week</strong> (<em>int</em><em>, </em><em>list</em><em>, </em><em>str</em>) – Day of Week for execution. Either 0…6, [0…6, 0…6, …] or <a class="reference internal" href="#task.crontab.ANY" title="task.crontab.ANY"><code class="xref py py-const docutils literal notranslate"><span class="pre">crontab.ANY</span></code></a> for every Day of Week.</li>
316
+</ul>
317
+</td>
318
+</tr>
319
+</tbody>
320
+</table>
321
+</dd></dl>
322
+
323
+</dd></dl>
324
+
325
+</dd></dl>
326
+
327
+<dl class="class">
328
+<dt id="task.delayed">
329
+<em class="property">class </em><code class="descclassname">task.</code><code class="descname">delayed</code><span class="sig-paren">(</span><em>cycle_time</em>, <em>callback</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#task.delayed" title="Permalink to this definition">¶</a></dt>
330
+<dd><p>Class to execute a callback a given time in the future. See also parent <a class="reference internal" href="#task.periodic" title="task.periodic"><code class="xref py py-class docutils literal notranslate"><span class="pre">periodic</span></code></a>.</p>
331
+<table class="docutils field-list" frame="void" rules="none">
332
+<col class="field-name" />
333
+<col class="field-body" />
334
+<tbody valign="top">
335
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
336
+<li><strong>time</strong> (<em>float</em>) – Delay time for execution of the given callback</li>
337
+<li><strong>callback</strong> (<em>callback</em>) – Callback to be executed</li>
338
+<li><strong>args</strong> (<em>args</em>) – Arguments to be given to callback</li>
339
+<li><strong>kwargs</strong> (<em>kwargs</em>) – Keword Arguments to be given to callback</li>
340
+</ul>
341
+</td>
342
+</tr>
343
+</tbody>
344
+</table>
345
+<p><strong>Example:</strong></p>
346
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env python</span>
347
+<span class="c1"># -*- coding: UTF-8 -*-</span>
348
+
349
+<span class="kn">import</span> <span class="nn">sys</span>
350
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../..&#39;</span><span class="p">)</span>
351
+<span class="kn">import</span> <span class="nn">task</span>
352
+<span class="kn">import</span> <span class="nn">time</span>
353
+
354
+
355
+<span class="k">def</span> <span class="nf">time_print</span><span class="p">(</span><span class="n">txt</span><span class="p">):</span>
356
+    <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">asctime</span><span class="p">()</span> <span class="o">+</span> <span class="s1">&#39;: &#39;</span> <span class="o">+</span> <span class="n">txt</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
357
+
358
+
359
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;task.delayed example:</span><span class="se">\n</span><span class="s2">---------------------&quot;</span><span class="p">)</span>
360
+<span class="n">dt</span> <span class="o">=</span> <span class="n">task</span><span class="o">.</span><span class="n">delayed</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="n">time_print</span><span class="p">,</span> <span class="s2">&quot;A delayed hello!&quot;</span><span class="p">)</span>
361
+<span class="n">dt</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
362
+<span class="k">try</span><span class="p">:</span>
363
+    <span class="n">time_print</span><span class="p">(</span><span class="s2">&quot;starting...&quot;</span><span class="p">)</span>
364
+    <span class="n">dt</span><span class="o">.</span><span class="n">join</span><span class="p">()</span>
365
+<span class="k">finally</span><span class="p">:</span>
366
+    <span class="n">dt</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>
367
+</pre></div>
368
+</div>
369
+<p>Will result to the following output:</p>
370
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>task.delayed example:
371
+---------------------
372
+Thu Jan  7 17:18:01 2021: starting...
373
+Thu Jan  7 17:18:06 2021: A delayed hello!
374
+</pre></div>
375
+</div>
376
+<dl class="method">
377
+<dt id="task.delayed.run">
378
+<code class="descname">run</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#task.delayed.run" title="Permalink to this definition">¶</a></dt>
379
+<dd><p>This starts the timer for the delayed execution.</p>
380
+</dd></dl>
381
+
382
+</dd></dl>
383
+
384
+<dl class="class">
385
+<dt id="task.periodic">
386
+<em class="property">class </em><code class="descclassname">task.</code><code class="descname">periodic</code><span class="sig-paren">(</span><em>cycle_time</em>, <em>callback</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#task.periodic" title="Permalink to this definition">¶</a></dt>
387
+<dd><p>Class to execute a callback cyclicly.</p>
388
+<table class="docutils field-list" frame="void" rules="none">
389
+<col class="field-name" />
390
+<col class="field-body" />
391
+<tbody valign="top">
392
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
393
+<li><strong>cycle_time</strong> (<em>float</em>) – Cycle time in seconds – callback will be executed every <em>cycle_time</em> seconds</li>
394
+<li><strong>callback</strong> (<em>callback</em>) – Callback to be executed</li>
395
+<li><strong>args</strong> (<em>args</em>) – Arguments to be given to the callback</li>
396
+<li><strong>kwargs</strong> (<em>kwargs</em>) – Keword Arguments to be given to callback</li>
397
+</ul>
398
+</td>
399
+</tr>
400
+</tbody>
401
+</table>
402
+<div class="admonition note">
403
+<p class="first admonition-title">Note</p>
404
+<p class="last">The Callback will get this instance as first argument, followed by <code class="xref py py-data docutils literal notranslate"><span class="pre">args</span></code> und <code class="xref py py-data docutils literal notranslate"><span class="pre">kwargs</span></code>.</p>
405
+</div>
406
+<p><strong>Example:</strong></p>
407
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env python</span>
408
+<span class="c1"># -*- coding: UTF-8 -*-</span>
409
+
410
+<span class="kn">import</span> <span class="nn">sys</span>
411
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../..&#39;</span><span class="p">)</span>
412
+<span class="kn">import</span> <span class="nn">task</span>
413
+<span class="kn">import</span> <span class="nn">time</span>
414
+
415
+<span class="n">task_num</span> <span class="o">=</span> <span class="mi">0</span>
416
+
417
+
418
+<span class="k">def</span> <span class="nf">time_print</span><span class="p">(</span><span class="n">txt</span><span class="p">):</span>
419
+    <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">asctime</span><span class="p">()</span> <span class="o">+</span> <span class="s1">&#39;: &#39;</span> <span class="o">+</span> <span class="n">txt</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
420
+
421
+
422
+<span class="k">def</span> <span class="nf">hello</span><span class="p">(</span><span class="n">rt</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
423
+    <span class="k">global</span> <span class="n">task_num</span>
424
+    <span class="n">task_num</span> <span class="o">+=</span> <span class="mi">1</span>
425
+    <span class="k">if</span> <span class="n">task_num</span> <span class="o">&gt;=</span> <span class="mi">5</span><span class="p">:</span>
426
+        <span class="n">rt</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>
427
+    <span class="n">tn</span> <span class="o">=</span> <span class="n">task_num</span>
428
+    <span class="n">time_print</span><span class="p">(</span><span class="s2">&quot;(Task </span><span class="si">%d</span><span class="s2">) Hello </span><span class="si">%s</span><span class="s2">!&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">tn</span><span class="p">,</span> <span class="n">name</span><span class="p">))</span>
429
+    <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mf">3.8</span><span class="p">)</span>
430
+    <span class="n">time_print</span><span class="p">(</span><span class="s2">&quot;(Task </span><span class="si">%d</span><span class="s2">) Ende!&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">tn</span><span class="p">))</span>
431
+
432
+
433
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;task.periodic example:</span><span class="se">\n</span><span class="s2">----------------------&quot;</span><span class="p">)</span>
434
+<span class="n">pt</span> <span class="o">=</span> <span class="n">task</span><span class="o">.</span><span class="n">periodic</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">hello</span><span class="p">,</span> <span class="s2">&quot;from periodic example&quot;</span><span class="p">)</span>
435
+<span class="n">pt</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
436
+<span class="k">try</span><span class="p">:</span>
437
+    <span class="n">time_print</span><span class="p">(</span><span class="s2">&quot;starting...&quot;</span><span class="p">)</span>
438
+    <span class="n">pt</span><span class="o">.</span><span class="n">join</span><span class="p">()</span>
439
+<span class="k">finally</span><span class="p">:</span>
440
+    <span class="n">pt</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>
441
+</pre></div>
442
+</div>
443
+<p>Will result to the following output:</p>
444
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>task.periodic example:
445
+----------------------
446
+Thu Jan  7 17:21:26 2021: starting...
447
+Thu Jan  7 17:21:26 2021: (Task 1) Hello from periodic example!
448
+Thu Jan  7 17:21:28 2021: (Task 2) Hello from periodic example!
449
+Thu Jan  7 17:21:30 2021: (Task 1) Ende!
450
+Thu Jan  7 17:21:30 2021: (Task 3) Hello from periodic example!
451
+Thu Jan  7 17:21:32 2021: (Task 2) Ende!
452
+Thu Jan  7 17:21:32 2021: (Task 4) Hello from periodic example!
453
+Thu Jan  7 17:21:34 2021: (Task 3) Ende!
454
+Thu Jan  7 17:21:34 2021: (Task 5) Hello from periodic example!
455
+Thu Jan  7 17:21:36 2021: (Task 4) Ende!
456
+Thu Jan  7 17:21:38 2021: (Task 5) Ende!
457
+</pre></div>
458
+</div>
459
+<dl class="method">
460
+<dt id="task.periodic.join">
461
+<code class="descname">join</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#task.periodic.join" title="Permalink to this definition">¶</a></dt>
462
+<dd><p>This blocks till the cyclic task is terminated.</p>
463
+<div class="admonition note">
464
+<p class="first admonition-title">Note</p>
465
+<p class="last">Using join means that somewhere has to be a condition calling <a class="reference internal" href="#task.periodic.stop" title="task.periodic.stop"><code class="xref py py-func docutils literal notranslate"><span class="pre">stop()</span></code></a> to terminate. Otherwise <code class="xref py py-func docutils literal notranslate"><span class="pre">task.join()</span></code> will never return.</p>
466
+</div>
467
+</dd></dl>
468
+
469
+<dl class="method">
470
+<dt id="task.periodic.run">
471
+<code class="descname">run</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#task.periodic.run" title="Permalink to this definition">¶</a></dt>
472
+<dd><p>This starts the cyclic execution of the given callback.</p>
473
+</dd></dl>
474
+
475
+<dl class="method">
476
+<dt id="task.periodic.stop">
477
+<code class="descname">stop</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#task.periodic.stop" title="Permalink to this definition">¶</a></dt>
478
+<dd><p>This stops the execution of any further task.</p>
479
+</dd></dl>
480
+
481
+</dd></dl>
482
+
483
+<dl class="class">
484
+<dt id="task.queue">
485
+<em class="property">class </em><code class="descclassname">task.</code><code class="descname">queue</code><span class="sig-paren">(</span><em>expire=True</em><span class="sig-paren">)</span><a class="headerlink" href="#task.queue" title="Permalink to this definition">¶</a></dt>
486
+<dd><p>Class to execute queued callbacks.</p>
487
+<table class="docutils field-list" frame="void" rules="none">
488
+<col class="field-name" />
489
+<col class="field-body" />
490
+<tbody valign="top">
491
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>expire</strong> (<em>bool</em>) – The default value for expire. See also <a class="reference internal" href="#task.queue.expire" title="task.queue.expire"><code class="xref py py-func docutils literal notranslate"><span class="pre">expire()</span></code></a>.</td>
492
+</tr>
493
+</tbody>
494
+</table>
495
+<p><strong>Example:</strong></p>
496
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env python</span>
497
+<span class="c1"># -*- coding: UTF-8 -*-</span>
498
+
499
+<span class="kn">import</span> <span class="nn">sys</span>
500
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../..&#39;</span><span class="p">)</span>
501
+<span class="kn">import</span> <span class="nn">task</span>
502
+<span class="kn">import</span> <span class="nn">time</span>
503
+
504
+<span class="n">task_num</span> <span class="o">=</span> <span class="mi">0</span>
505
+
506
+
507
+<span class="k">def</span> <span class="nf">time_print</span><span class="p">(</span><span class="n">txt</span><span class="p">):</span>
508
+    <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">asctime</span><span class="p">()</span> <span class="o">+</span> <span class="s1">&#39;: &#39;</span> <span class="o">+</span> <span class="n">txt</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
509
+
510
+
511
+<span class="k">def</span> <span class="nf">hello</span><span class="p">(</span><span class="n">rt</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
512
+    <span class="k">global</span> <span class="n">task_num</span>
513
+    <span class="n">task_num</span> <span class="o">+=</span> <span class="mi">1</span>
514
+    <span class="k">if</span> <span class="n">task_num</span> <span class="o">&gt;=</span> <span class="mi">5</span><span class="p">:</span>
515
+        <span class="n">rt</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>
516
+    <span class="n">tn</span> <span class="o">=</span> <span class="n">task_num</span>
517
+    <span class="n">time_print</span><span class="p">(</span><span class="s2">&quot;(Task </span><span class="si">%d</span><span class="s2">) Hello </span><span class="si">%s</span><span class="s2">!&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">tn</span><span class="p">,</span> <span class="n">name</span><span class="p">))</span>
518
+    <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mf">3.8</span><span class="p">)</span>
519
+    <span class="n">time_print</span><span class="p">(</span><span class="s2">&quot;(Task </span><span class="si">%d</span><span class="s2">) Ende!&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">tn</span><span class="p">))</span>
520
+
521
+
522
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;task.queue example:</span><span class="se">\n</span><span class="s2">----------------------&quot;</span><span class="p">)</span>
523
+<span class="n">q</span> <span class="o">=</span> <span class="n">task</span><span class="o">.</span><span class="n">queue</span><span class="p">()</span>
524
+<span class="n">q</span><span class="o">.</span><span class="n">enqueue</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="n">hello</span><span class="p">,</span> <span class="s2">&quot;from queue example (5)&quot;</span><span class="p">)</span>
525
+<span class="n">q</span><span class="o">.</span><span class="n">enqueue</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="n">hello</span><span class="p">,</span> <span class="s2">&quot;from queue example (6)&quot;</span><span class="p">)</span>
526
+<span class="n">q</span><span class="o">.</span><span class="n">enqueue</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="n">hello</span><span class="p">,</span> <span class="s2">&quot;from queue example (4)&quot;</span><span class="p">)</span>
527
+<span class="n">q</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
528
+</pre></div>
529
+</div>
530
+<p>Will result to the following output:</p>
531
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>task.queue example:
532
+----------------------
533
+Thu Jan  7 17:30:54 2021: (Task 1) Hello from queue example (4)!
534
+Thu Jan  7 17:30:58 2021: (Task 1) Ende!
535
+Thu Jan  7 17:30:58 2021: (Task 2) Hello from queue example (5)!
536
+Thu Jan  7 17:31:02 2021: (Task 2) Ende!
537
+Thu Jan  7 17:31:02 2021: (Task 3) Hello from queue example (6)!
538
+Thu Jan  7 17:31:06 2021: (Task 3) Ende!
539
+</pre></div>
540
+</div>
541
+<dl class="method">
542
+<dt id="task.queue.clean_queue">
543
+<code class="descname">clean_queue</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#task.queue.clean_queue" title="Permalink to this definition">¶</a></dt>
544
+<dd><p>This Methods removes all jobs from the queue.</p>
545
+<div class="admonition note">
546
+<p class="first admonition-title">Note</p>
547
+<p class="last">Be aware that already running jobs will not be terminated.</p>
548
+</div>
549
+</dd></dl>
550
+
551
+<dl class="method">
552
+<dt id="task.queue.enqueue">
553
+<code class="descname">enqueue</code><span class="sig-paren">(</span><em>priority</em>, <em>callback</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#task.queue.enqueue" title="Permalink to this definition">¶</a></dt>
554
+<dd><p>This enqueues a given callback.</p>
555
+<table class="docutils field-list" frame="void" rules="none">
556
+<col class="field-name" />
557
+<col class="field-body" />
558
+<tbody valign="top">
559
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
560
+<li><strong>priority</strong> (<em>number</em>) – The priority indication number of this task. The lowest value will be queued first.</li>
561
+<li><strong>callback</strong> (<em>callback</em>) – Callback to be executed</li>
562
+<li><strong>args</strong> (<em>args</em>) – Arguments to be given to callback</li>
563
+<li><strong>kwargs</strong> (<em>kwargs</em>) – Keword Arguments to be given to callback</li>
564
+</ul>
565
+</td>
566
+</tr>
567
+</tbody>
568
+</table>
569
+<div class="admonition note">
570
+<p class="first admonition-title">Note</p>
571
+<p class="last">Callback will get this instance as first argument, followed by <code class="xref py py-data docutils literal notranslate"><span class="pre">args</span></code> und <code class="xref py py-data docutils literal notranslate"><span class="pre">kwargs</span></code>.</p>
572
+</div>
573
+</dd></dl>
574
+
575
+<dl class="method">
576
+<dt id="task.queue.expire">
577
+<code class="descname">expire</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#task.queue.expire" title="Permalink to this definition">¶</a></dt>
578
+<dd><p>This sets the expire flag. That means that the process will stop after queue gets empty.</p>
579
+</dd></dl>
580
+
581
+<dl class="method">
582
+<dt id="task.queue.run">
583
+<code class="descname">run</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#task.queue.run" title="Permalink to this definition">¶</a></dt>
584
+<dd><p>This starts the execution of the queued callbacks.</p>
585
+</dd></dl>
586
+
587
+<dl class="method">
588
+<dt id="task.queue.stop">
589
+<code class="descname">stop</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#task.queue.stop" title="Permalink to this definition">¶</a></dt>
590
+<dd><p>This sets the stop flag. That means that the process will stop after finishing the active task.</p>
591
+</dd></dl>
592
+
593
+</dd></dl>
594
+
595
+<dl class="class">
596
+<dt id="task.threaded_queue">
597
+<em class="property">class </em><code class="descclassname">task.</code><code class="descname">threaded_queue</code><span class="sig-paren">(</span><em>expire=False</em><span class="sig-paren">)</span><a class="headerlink" href="#task.threaded_queue" title="Permalink to this definition">¶</a></dt>
598
+<dd><p>Class to execute queued callbacks in a background thread (See also parent <a class="reference internal" href="#task.queue" title="task.queue"><code class="xref py py-class docutils literal notranslate"><span class="pre">queue</span></code></a>).</p>
599
+<table class="docutils field-list" frame="void" rules="none">
600
+<col class="field-name" />
601
+<col class="field-body" />
602
+<tbody valign="top">
603
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>expire</strong> (<em>bool</em>) – The default value for expire. See also <a class="reference internal" href="#task.queue.expire" title="task.queue.expire"><code class="xref py py-func docutils literal notranslate"><span class="pre">queue.expire()</span></code></a>.</td>
604
+</tr>
605
+</tbody>
606
+</table>
607
+<p><strong>Example:</strong></p>
608
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env python</span>
609
+<span class="c1"># -*- coding: UTF-8 -*-</span>
610
+
611
+<span class="kn">import</span> <span class="nn">sys</span>
612
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../..&#39;</span><span class="p">)</span>
613
+<span class="kn">import</span> <span class="nn">task</span>
614
+<span class="kn">import</span> <span class="nn">time</span>
615
+
616
+<span class="n">task_num</span> <span class="o">=</span> <span class="mi">0</span>
617
+
618
+
619
+<span class="k">def</span> <span class="nf">time_print</span><span class="p">(</span><span class="n">txt</span><span class="p">):</span>
620
+    <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">asctime</span><span class="p">()</span> <span class="o">+</span> <span class="s1">&#39;: &#39;</span> <span class="o">+</span> <span class="n">txt</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
621
+
622
+
623
+<span class="k">def</span> <span class="nf">hello</span><span class="p">(</span><span class="n">rt</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
624
+    <span class="k">global</span> <span class="n">task_num</span>
625
+    <span class="n">task_num</span> <span class="o">+=</span> <span class="mi">1</span>
626
+    <span class="k">if</span> <span class="n">task_num</span> <span class="o">&gt;=</span> <span class="mi">5</span><span class="p">:</span>
627
+        <span class="n">rt</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>
628
+    <span class="n">tn</span> <span class="o">=</span> <span class="n">task_num</span>
629
+    <span class="n">time_print</span><span class="p">(</span><span class="s2">&quot;(Task </span><span class="si">%d</span><span class="s2">) Hello </span><span class="si">%s</span><span class="s2">!&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">tn</span><span class="p">,</span> <span class="n">name</span><span class="p">))</span>
630
+    <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mf">3.8</span><span class="p">)</span>
631
+    <span class="n">time_print</span><span class="p">(</span><span class="s2">&quot;(Task </span><span class="si">%d</span><span class="s2">) Ende!&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">tn</span><span class="p">))</span>
632
+
633
+
634
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;task.threaded_queue example:</span><span class="se">\n</span><span class="s2">-------------------------------&quot;</span><span class="p">)</span>
635
+<span class="n">tq</span> <span class="o">=</span> <span class="n">task</span><span class="o">.</span><span class="n">threaded_queue</span><span class="p">()</span>
636
+<span class="n">tq</span><span class="o">.</span><span class="n">enqueue</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="n">hello</span><span class="p">,</span> <span class="s2">&quot;from queue example (5)&quot;</span><span class="p">)</span>
637
+<span class="n">tq</span><span class="o">.</span><span class="n">enqueue</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="n">hello</span><span class="p">,</span> <span class="s2">&quot;from queue example (6)&quot;</span><span class="p">)</span>
638
+<span class="n">tq</span><span class="o">.</span><span class="n">enqueue</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="n">hello</span><span class="p">,</span> <span class="s2">&quot;from queue example (4)&quot;</span><span class="p">)</span>
639
+<span class="n">tq</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
640
+<span class="k">try</span><span class="p">:</span>
641
+    <span class="n">time_print</span><span class="p">(</span><span class="s2">&quot;starting...&quot;</span><span class="p">)</span>
642
+    <span class="n">tq</span><span class="o">.</span><span class="n">join</span><span class="p">()</span>
643
+<span class="k">finally</span><span class="p">:</span>
644
+    <span class="n">tq</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>
645
+</pre></div>
646
+</div>
647
+<p>Will result to the following output:</p>
648
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>task.threaded_queue example:
649
+-------------------------------
650
+Thu Jan  7 17:33:50 2021: (Task 1) Hello from queue example (4)!
651
+Thu Jan  7 17:33:50 2021: starting...
652
+Thu Jan  7 17:33:54 2021: (Task 1) Ende!
653
+Thu Jan  7 17:33:54 2021: (Task 2) Hello from queue example (5)!
654
+Thu Jan  7 17:33:58 2021: (Task 2) Ende!
655
+Thu Jan  7 17:33:58 2021: (Task 3) Hello from queue example (6)!
656
+Thu Jan  7 17:34:01 2021: (Task 3) Ende!
657
+</pre></div>
658
+</div>
659
+<dl class="method">
660
+<dt id="task.threaded_queue.join">
661
+<code class="descname">join</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#task.threaded_queue.join" title="Permalink to this definition">¶</a></dt>
662
+<dd><p>This blocks till the queue is empty.</p>
663
+<div class="admonition note">
664
+<p class="first admonition-title">Note</p>
665
+<p class="last">If the queue does not run dry, join will block till the end of the days.</p>
666
+</div>
667
+</dd></dl>
668
+
669
+<dl class="method">
670
+<dt id="task.threaded_queue.run">
671
+<code class="descname">run</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#task.threaded_queue.run" title="Permalink to this definition">¶</a></dt>
672
+<dd><p>This starts the execution of the queued callbacks.</p>
673
+</dd></dl>
674
+
675
+<dl class="method">
676
+<dt id="task.threaded_queue.stop">
677
+<code class="descname">stop</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#task.threaded_queue.stop" title="Permalink to this definition">¶</a></dt>
678
+<dd><p>This sets the stop flag. That means that the process will stop after finishing the active task.</p>
679
+</dd></dl>
680
+
681
+</dd></dl>
682
+
683
+</div>
684
+<div class="toctree-wrapper compound">
685
+</div>
686
+</div>
687
+<div class="section" id="indices-and-tables">
688
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
689
+<ul class="simple">
690
+<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
691
+<li><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></li>
692
+<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
693
+</ul>
694
+</div>
695
+
696
+
697
+           </div>
698
+           
699
+          </div>
700
+          <footer>
701
+  
702
+
703
+  <hr/>
704
+
705
+  <div role="contentinfo">
706
+    <p>
707
+        
708
+        &copy; Copyright 2021, Dirk Alders
709
+
710
+    </p>
711
+  </div>
712
+    
713
+    
714
+    
715
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
716
+    
717
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
718
+    
719
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
720
+
721
+</footer>
722
+
723
+        </div>
724
+      </div>
725
+
726
+    </section>
727
+
728
+  </div>
729
+  
730
+
731
+  <script type="text/javascript">
732
+      jQuery(function () {
733
+          SphinxRtdTheme.Navigation.enable(true);
734
+      });
735
+  </script>
736
+
737
+  
738
+  
739
+    
740
+   
741
+
742
+</body>
743
+</html>

BIN
_docs_/objects.inv View File


+ 216
- 0
_docs_/py-modindex.html View File

@@ -0,0 +1,216 @@
1
+
2
+
3
+<!DOCTYPE html>
4
+<html class="writer-html4" lang="en" >
5
+<head>
6
+  <meta charset="utf-8">
7
+  
8
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+  
10
+  <title>Python Module Index &mdash; task  documentation</title>
11
+  
12
+
13
+  
14
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
15
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
16
+
17
+  
18
+  
19
+  
20
+  
21
+
22
+  
23
+  <!--[if lt IE 9]>
24
+    <script src="_static/js/html5shiv.min.js"></script>
25
+  <![endif]-->
26
+  
27
+    
28
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
29
+        <script type="text/javascript" src="_static/jquery.js"></script>
30
+        <script type="text/javascript" src="_static/underscore.js"></script>
31
+        <script type="text/javascript" src="_static/doctools.js"></script>
32
+        <script type="text/javascript" src="_static/language_data.js"></script>
33
+    
34
+    <script type="text/javascript" src="_static/js/theme.js"></script>
35
+
36
+    
37
+    <link rel="index" title="Index" href="genindex.html" />
38
+    <link rel="search" title="Search" href="search.html" />
39
+ 
40
+
41
+    <script type="text/javascript">
42
+      DOCUMENTATION_OPTIONS.COLLAPSE_INDEX = true;
43
+    </script>
44
+
45
+
46
+</head>
47
+
48
+<body class="wy-body-for-nav">
49
+
50
+   
51
+  <div class="wy-grid-for-nav">
52
+    
53
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
54
+      <div class="wy-side-scroll">
55
+        <div class="wy-side-nav-search" >
56
+          
57
+
58
+          
59
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> task
60
+          
61
+
62
+          
63
+          </a>
64
+
65
+          
66
+            
67
+            
68
+          
69
+
70
+          
71
+<div role="search">
72
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
73
+    <input type="text" name="q" placeholder="Search docs" />
74
+    <input type="hidden" name="check_keywords" value="yes" />
75
+    <input type="hidden" name="area" value="default" />
76
+  </form>
77
+</div>
78
+
79
+          
80
+        </div>
81
+
82
+        
83
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
84
+          
85
+            
86
+            
87
+              
88
+            
89
+            
90
+              <!-- Local TOC -->
91
+              <div class="local-toc"></div>
92
+            
93
+          
94
+        </div>
95
+        
96
+      </div>
97
+    </nav>
98
+
99
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
100
+
101
+      
102
+      <nav class="wy-nav-top" aria-label="top navigation">
103
+        
104
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
105
+          <a href="index.html">task</a>
106
+        
107
+      </nav>
108
+
109
+
110
+      <div class="wy-nav-content">
111
+        
112
+        <div class="rst-content">
113
+        
114
+          
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+<div role="navigation" aria-label="breadcrumbs navigation">
131
+
132
+  <ul class="wy-breadcrumbs">
133
+    
134
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
135
+        
136
+      <li>Python Module Index</li>
137
+    
138
+    
139
+      <li class="wy-breadcrumbs-aside">
140
+        
141
+      </li>
142
+    
143
+  </ul>
144
+
145
+  
146
+  <hr/>
147
+</div>
148
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
149
+           <div itemprop="articleBody">
150
+            
151
+
152
+   <h1>Python Module Index</h1>
153
+
154
+   <div class="modindex-jumpbox">
155
+   <a href="#cap-t"><strong>t</strong></a>
156
+   </div>
157
+
158
+   <table class="indextable modindextable">
159
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
160
+     <tr class="cap" id="cap-t"><td></td><td>
161
+       <strong>t</strong></td><td></td></tr>
162
+     <tr>
163
+       <td></td>
164
+       <td>
165
+       <a href="index.html#module-task"><code class="xref">task</code></a></td><td>
166
+       <em></em></td></tr>
167
+   </table>
168
+
169
+
170
+           </div>
171
+           
172
+          </div>
173
+          <footer>
174
+  
175
+
176
+  <hr/>
177
+
178
+  <div role="contentinfo">
179
+    <p>
180
+        
181
+        &copy; Copyright 2021, Dirk Alders
182
+
183
+    </p>
184
+  </div>
185
+    
186
+    
187
+    
188
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
189
+    
190
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
191
+    
192
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
193
+
194
+</footer>
195
+
196
+        </div>
197
+      </div>
198
+
199
+    </section>
200
+
201
+  </div>
202
+  
203
+
204
+  <script type="text/javascript">
205
+      jQuery(function () {
206
+          SphinxRtdTheme.Navigation.enable(true);
207
+      });
208
+  </script>
209
+
210
+  
211
+  
212
+    
213
+   
214
+
215
+</body>
216
+</html>

+ 214
- 0
_docs_/search.html View File

@@ -0,0 +1,214 @@
1
+
2
+
3
+<!DOCTYPE html>
4
+<html class="writer-html4" lang="en" >
5
+<head>
6
+  <meta charset="utf-8">
7
+  
8
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+  
10
+  <title>Search &mdash; task  documentation</title>
11
+  
12
+
13
+  
14
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
15
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
16
+
17
+  
18
+  
19
+  
20
+  
21
+
22
+  
23
+    
24
+  <!--[if lt IE 9]>
25
+    <script src="_static/js/html5shiv.min.js"></script>
26
+  <![endif]-->
27
+  
28
+    
29
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
30
+        <script type="text/javascript" src="_static/jquery.js"></script>
31
+        <script type="text/javascript" src="_static/underscore.js"></script>
32
+        <script type="text/javascript" src="_static/doctools.js"></script>
33
+        <script type="text/javascript" src="_static/language_data.js"></script>
34
+    
35
+    <script type="text/javascript" src="_static/js/theme.js"></script>
36
+
37
+    
38
+    <script type="text/javascript" src="_static/searchtools.js"></script>
39
+    <link rel="index" title="Index" href="genindex.html" />
40
+    <link rel="search" title="Search" href="#" /> 
41
+</head>
42
+
43
+<body class="wy-body-for-nav">
44
+
45
+   
46
+  <div class="wy-grid-for-nav">
47
+    
48
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
49
+      <div class="wy-side-scroll">
50
+        <div class="wy-side-nav-search" >
51
+          
52
+
53
+          
54
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> task
55
+          
56
+
57
+          
58
+          </a>
59
+
60
+          
61
+            
62
+            
63
+          
64
+
65
+          
66
+<div role="search">
67
+  <form id="rtd-search-form" class="wy-form" action="#" method="get">
68
+    <input type="text" name="q" placeholder="Search docs" />
69
+    <input type="hidden" name="check_keywords" value="yes" />
70
+    <input type="hidden" name="area" value="default" />
71
+  </form>
72
+</div>
73
+
74
+          
75
+        </div>
76
+
77
+        
78
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
79
+          
80
+            
81
+            
82
+              
83
+            
84
+            
85
+              <!-- Local TOC -->
86
+              <div class="local-toc"></div>
87
+            
88
+          
89
+        </div>
90
+        
91
+      </div>
92
+    </nav>
93
+
94
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
95
+
96
+      
97
+      <nav class="wy-nav-top" aria-label="top navigation">
98
+        
99
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
100
+          <a href="index.html">task</a>
101
+        
102
+      </nav>
103
+
104
+
105
+      <div class="wy-nav-content">
106
+        
107
+        <div class="rst-content">
108
+        
109
+          
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+<div role="navigation" aria-label="breadcrumbs navigation">
126
+
127
+  <ul class="wy-breadcrumbs">
128
+    
129
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
130
+        
131
+      <li>Search</li>
132
+    
133
+    
134
+      <li class="wy-breadcrumbs-aside">
135
+        
136
+            
137
+        
138
+      </li>
139
+    
140
+  </ul>
141
+
142
+  
143
+  <hr/>
144
+</div>
145
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
146
+           <div itemprop="articleBody">
147
+            
148
+  <noscript>
149
+  <div id="fallback" class="admonition warning">
150
+    <p class="last">
151
+      Please activate JavaScript to enable the search functionality.
152
+    </p>
153
+  </div>
154
+  </noscript>
155
+
156
+  
157
+  <div id="search-results">
158
+  
159
+  </div>
160
+
161
+           </div>
162
+           
163
+          </div>
164
+          <footer>
165
+  
166
+
167
+  <hr/>
168
+
169
+  <div role="contentinfo">
170
+    <p>
171
+        
172
+        &copy; Copyright 2021, Dirk Alders
173
+
174
+    </p>
175
+  </div>
176
+    
177
+    
178
+    
179
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
180
+    
181
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
182
+    
183
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
184
+
185
+</footer>
186
+
187
+        </div>
188
+      </div>
189
+
190
+    </section>
191
+
192
+  </div>
193
+  
194
+
195
+  <script type="text/javascript">
196
+      jQuery(function () {
197
+          SphinxRtdTheme.Navigation.enable(true);
198
+      });
199
+  </script>
200
+
201
+  
202
+  
203
+    
204
+  
205
+  <script type="text/javascript">
206
+    jQuery(function() { Search.loadIndex("searchindex.js"); });
207
+  </script>
208
+  
209
+  <script type="text/javascript" id="searchindexloader"></script>
210
+   
211
+
212
+
213
+</body>
214
+</html>

+ 1
- 0
_docs_/searchindex.js View File

@@ -0,0 +1 @@
1
+Search.setIndex({docnames:["index"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:55},filenames:["index.rst"],objects:{"":{task:[0,0,0,"-"]},"task.crontab":{ANY:[0,2,1,""],add_cronjob:[0,3,1,""],cronjob:[0,1,1,""]},"task.crontab.cronjob":{all_match:[0,1,1,""],cron_execution:[0,3,1,""],set_trigger_conditions:[0,3,1,""]},"task.delayed":{run:[0,3,1,""]},"task.periodic":{join:[0,3,1,""],run:[0,3,1,""],stop:[0,3,1,""]},"task.queue":{clean_queue:[0,3,1,""],enqueue:[0,3,1,""],expire:[0,3,1,""],run:[0,3,1,""],stop:[0,3,1,""]},"task.threaded_queue":{join:[0,3,1,""],run:[0,3,1,""],stop:[0,3,1,""]},task:{crontab:[0,1,1,""],delayed:[0,1,1,""],periodic:[0,1,1,""],queue:[0,1,1,""],threaded_queue:[0,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","attribute","Python attribute"],"3":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:class","2":"py:attribute","3":"py:method"},terms:{"02d":0,"class":0,"default":0,"final":0,"float":0,"import":0,"int":0,"return":0,"true":0,"try":0,"var":[],That:0,The:0,Using:0,Will:0,accuraci:0,activ:0,add:0,add_cronjob:0,added:0,adding:0,after:0,alder:0,all:0,all_match:0,alon:0,alreadi:0,also:0,ani:0,append:0,arg:0,argument:0,asctim:0,author:0,auto_expir:[],awar:0,background:0,between:0,bin:0,block:0,bool:0,call:0,callback:0,chang:0,check:0,clean_queu:0,code:0,condit:0,constant:0,creat:0,cron:0,cron_execut:0,cronjob:0,crontab:0,current:0,cycl:0,cycle_tim:0,cyclic:0,cyclicli:0,dai:0,day_of_month:0,day_of_week:0,def:0,delai:0,depend:0,descript:0,dirk:0,doe:0,dry:0,either:0,empti:0,end:0,enqueu:0,env:0,event:0,everi:0,everyth:0,exampl:0,execut:0,expir:0,fals:0,finish:0,first:0,flag:0,follow:0,from:0,func:0,further:0,futur:0,gener:0,get:0,given:0,global:0,handl:0,has:0,hello:0,helpful:0,hour:0,index:0,initialis:0,instanc:0,jan:0,job:0,join:0,keword:0,kewordsargu:[],keyword:0,kwarg:0,list:0,localtim:0,lowest:0,match:0,maximum:0,mean:0,method:0,minut:0,mockeri:0,month:0,mount:0,name:0,need:0,never:0,none:0,number:0,object:0,onc:[],otherwis:0,output:0,page:0,paramet:0,parent:0,path:0,period:0,periodix:[],print:0,print_localtim:0,prioriti:0,process:0,python:0,queu:0,queue:0,remov:0,repeat:0,result:0,run:0,runnung:[],search:0,second:0,see:0,set:0,set_trigger_condit:0,should:0,sinc:0,sleep:0,somewher:0,specifi:0,stand:0,start:0,stdout:0,stop:0,store:0,str:0,strftime:0,struct_tim:0,submodul:0,sudo:0,support:0,sys:0,task_num:0,termin:0,thi:0,thread:0,threaded_queu:0,thu:0,till:0,time:0,time_print:0,timeout:[],timer:0,tm_hour:0,tm_isdst:0,tm_mdai:0,tm_min:0,tm_mon:0,tm_sec:0,tm_wdai:0,tm_ydai:0,tm_year:0,trigger:0,txt:0,und:0,unittest:0,univers:0,used:0,using:0,usr:0,utf:0,valu:0,variabl:[],week:0,write:0},titles:["Welcome to task\u2019s documentation!"],titleterms:{document:0,indic:0,modul:0,tabl:0,task:0,welcom:0}})

+ 11
- 0
_examples_/Makefile View File

@@ -0,0 +1,11 @@
1
+EXAMPLES = $(wildcard *.py)
2
+LOGFILES = ${EXAMPLES:.py=.log}
3
+
4
+.PHONY: all
5
+all: $(LOGFILES)
6
+
7
+%.log: %.py
8
+	python3 $< > $@
9
+
10
+clean:
11
+	rm -f $(LOGFILES)

+ 24
- 0
_examples_/crontab.py View File

@@ -0,0 +1,24 @@
1
+#!/usr/bin/env python
2
+# -*- coding: UTF-8 -*-
3
+
4
+import sys
5
+sys.path.append('../..')
6
+import task
7
+import time
8
+
9
+
10
+def print_localtime(cj):
11
+    print(time.localtime())
12
+
13
+
14
+ct = task.crontab(accuracy=7)
15
+minute = int(time.strftime('%M'))
16
+ct.add_cronjob([minute + 1, minute + 3], task.crontab.ANY, task.crontab.ANY, task.crontab.ANY, task.crontab.ANY, print_localtime)
17
+print('Cronjob added for Minute: %02d, %02d\n--------------------------------\n' % (minute + 1, minute + 3))
18
+ct.run()
19
+try:
20
+    time.sleep(195)
21
+    ct.stop()
22
+    ct.join()
23
+finally:
24
+    ct.stop()

+ 21
- 0
_examples_/delayed.py View File

@@ -0,0 +1,21 @@
1
+#!/usr/bin/env python
2
+# -*- coding: UTF-8 -*-
3
+
4
+import sys
5
+sys.path.append('../..')
6
+import task
7
+import time
8
+
9
+
10
+def time_print(txt):
11
+    sys.stdout.write(time.asctime() + ': ' + txt + '\n')
12
+
13
+
14
+print("task.delayed example:\n---------------------")
15
+dt = task.delayed(5, time_print, "A delayed hello!")
16
+dt.run()
17
+try:
18
+    time_print("starting...")
19
+    dt.join()
20
+finally:
21
+    dt.stop()

+ 34
- 0
_examples_/periodic.py View File

@@ -0,0 +1,34 @@
1
+#!/usr/bin/env python
2
+# -*- coding: UTF-8 -*-
3
+
4
+import sys
5
+sys.path.append('../..')
6
+import task
7
+import time
8
+
9
+task_num = 0
10
+
11
+
12
+def time_print(txt):
13
+    sys.stdout.write(time.asctime() + ': ' + txt + '\n')
14
+
15
+
16
+def hello(rt, name):
17
+    global task_num
18
+    task_num += 1
19
+    if task_num >= 5:
20
+        rt.stop()
21
+    tn = task_num
22
+    time_print("(Task %d) Hello %s!" % (tn, name))
23
+    time.sleep(3.8)
24
+    time_print("(Task %d) Ende!" % (tn))
25
+
26
+
27
+print("task.periodic example:\n----------------------")
28
+pt = task.periodic(2, hello, "from periodic example")
29
+pt.run()
30
+try:
31
+    time_print("starting...")
32
+    pt.join()
33
+finally:
34
+    pt.stop()

+ 37
- 0
_examples_/threaded_queue.py View File

@@ -0,0 +1,37 @@
1
+#!/usr/bin/env python
2
+# -*- coding: UTF-8 -*-
3
+
4
+import sys
5
+sys.path.append('../..')
6
+import task
7
+import time
8
+
9
+task_num = 0
10
+
11
+
12
+def time_print(txt):
13
+    sys.stdout.write(time.asctime() + ': ' + txt + '\n')
14
+
15
+
16
+def hello(rt, name):
17
+    global task_num
18
+    task_num += 1
19
+    if task_num >= 5:
20
+        rt.stop()
21
+    tn = task_num
22
+    time_print("(Task %d) Hello %s!" % (tn, name))
23
+    time.sleep(3.8)
24
+    time_print("(Task %d) Ende!" % (tn))
25
+
26
+
27
+print("task.threaded_queue example:\n-------------------------------")
28
+tq = task.threaded_queue()
29
+tq.enqueue(5, hello, "from queue example (5)")
30
+tq.enqueue(6, hello, "from queue example (6)")
31
+tq.enqueue(4, hello, "from queue example (4)")
32
+tq.run()
33
+try:
34
+    time_print("starting...")
35
+    tq.join()
36
+finally:
37
+    tq.stop()

+ 32
- 0
_examples_/tqueue.py View File

@@ -0,0 +1,32 @@
1
+#!/usr/bin/env python
2
+# -*- coding: UTF-8 -*-
3
+
4
+import sys
5
+sys.path.append('../..')
6
+import task
7
+import time
8
+
9
+task_num = 0
10
+
11
+
12
+def time_print(txt):
13
+    sys.stdout.write(time.asctime() + ': ' + txt + '\n')
14
+
15
+
16
+def hello(rt, name):
17
+    global task_num
18
+    task_num += 1
19
+    if task_num >= 5:
20
+        rt.stop()
21
+    tn = task_num
22
+    time_print("(Task %d) Hello %s!" % (tn, name))
23
+    time.sleep(3.8)
24
+    time_print("(Task %d) Ende!" % (tn))
25
+
26
+
27
+print("task.queue example:\n----------------------")
28
+q = task.queue()
29
+q.enqueue(5, hello, "from queue example (5)")
30
+q.enqueue(6, hello, "from queue example (6)")
31
+q.enqueue(4, hello, "from queue example (4)")
32
+q.run()

+ 5345
- 5406
_testresults_/unittest.json
File diff suppressed because it is too large
View File


BIN
_testresults_/unittest.pdf View File


Loading…
Cancel
Save