genocide 174__tar.gz → 175__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {genocide-174 → genocide-175}/PKG-INFO +1 -1
- {genocide-174 → genocide-175}/docs/about.rst +1 -1
- genocide-175/docs/ack.png +0 -0
- {genocide-174 → genocide-175}/docs/conf.py +1 -1
- {genocide-174 → genocide-175}/docs/files/sitemap.xml +0 -5
- {genocide-174 → genocide-175}/docs/manual.rst +3 -90
- {genocide-174 → genocide-175}/docs/writings.rst +1 -1
- {genocide-174 → genocide-175}/genocide/__init__.py +3 -0
- genocide-175/genocide/__main__.py +39 -0
- {genocide-174 → genocide-175}/genocide/client.py +2 -3
- {genocide-174 → genocide-175}/genocide/cmds.py +1 -2
- {genocide-174 → genocide-175}/genocide/console.py +2 -1
- {genocide-174 → genocide-175}/genocide/decoder.py +0 -1
- {genocide-174 → genocide-175}/genocide/default.py +1 -2
- {genocide-174 → genocide-175}/genocide/encoder.py +1 -2
- {genocide-174 → genocide-175}/genocide/errors.py +1 -2
- {genocide-174 → genocide-175}/genocide/event.py +3 -2
- genocide-174/genocide/interface.py → genocide-175/genocide/face.py +1 -2
- {genocide-174 → genocide-175}/genocide/fleet.py +1 -4
- {genocide-174 → genocide-175}/genocide/log.py +2 -3
- {genocide-174 → genocide-175}/genocide/main.py +13 -3
- genocide-175/genocide/modules/__init__.py +15 -0
- {genocide-174 → genocide-175}/genocide/object.py +1 -23
- {genocide-174 → genocide-175}/genocide/persist.py +2 -2
- {genocide-174 → genocide-175}/genocide/reactor.py +2 -3
- genocide-175/genocide/runtime.py +37 -0
- {genocide-174 → genocide-175}/genocide/thread.py +1 -2
- {genocide-174 → genocide-175}/genocide/timer.py +2 -2
- {genocide-174 → genocide-175}/genocide/utils.py +19 -7
- {genocide-174 → genocide-175}/genocide.egg-info/PKG-INFO +1 -1
- {genocide-174 → genocide-175}/genocide.egg-info/SOURCES.txt +3 -13
- genocide-175/genocide.egg-info/entry_points.txt +2 -0
- {genocide-174 → genocide-175}/pyproject.toml +8 -7
- genocide-175/tests/test_none.py +17 -0
- genocide-174/genocide/__main__.py +0 -83
- genocide-174/genocide/cache.py +0 -30
- genocide-174/genocide/config.py +0 -19
- genocide-174/genocide/daemon.py +0 -72
- genocide-174/genocide/group.py +0 -19
- genocide-174/genocide/modules/__init__.py +0 -22
- genocide-174/genocide/modules/err.py +0 -21
- genocide-174/genocide/modules/irc.py +0 -655
- genocide-174/genocide/modules/log.py +0 -39
- genocide-174/genocide/modules/mod.py +0 -20
- genocide-174/genocide/modules/rss.py +0 -508
- genocide-174/genocide/modules/tdo.py +0 -61
- genocide-174/genocide/modules/thr.py +0 -40
- genocide-174/genocide/prompt.py +0 -75
- genocide-174/genocide/runtime.py +0 -27
- genocide-174/genocide.egg-info/entry_points.txt +0 -4
- {genocide-174 → genocide-175}/README.rst +0 -0
- {genocide-174 → genocide-175}/docs/ECHAabilify.png +0 -0
- {genocide-174 → genocide-175}/docs/ECHAclozapine.png +0 -0
- {genocide-174 → genocide-175}/docs/ECHAhaldol.png +0 -0
- {genocide-174 → genocide-175}/docs/ECHAzyprexa.png +0 -0
- {genocide-174 → genocide-175}/docs/OTP111.png +0 -0
- {genocide-174 → genocide-175}/docs/OTP222.png +0 -0
- {genocide-174 → genocide-175}/docs/_static/genocide.css +0 -0
- {genocide-174 → genocide-175}/docs/_templates/base.rst +0 -0
- {genocide-174 → genocide-175}/docs/_templates/class.rst +0 -0
- {genocide-174 → genocide-175}/docs/_templates/mine.rst +0 -0
- {genocide-174 → genocide-175}/docs/_templates/module.rst +0 -0
- {genocide-174 → genocide-175}/docs/ack3.png +0 -0
- {genocide-174 → genocide-175}/docs/bevestigd.jpg +0 -0
- {genocide-174 → genocide-175}/docs/bylaw.png +0 -0
- {genocide-174 → genocide-175}/docs/evidence.rst +0 -0
- {genocide-174 → genocide-175}/docs/genocide.jpg +0 -0
- {genocide-174 → genocide-175}/docs/genocide.png +0 -0
- {genocide-174 → genocide-175}/docs/guilty.rst +0 -0
- {genocide-174 → genocide-175}/docs/index.rst +0 -0
- {genocide-174 → genocide-175}/docs/informed.jpg +0 -0
- {genocide-174 → genocide-175}/docs/kamer2.png +0 -0
- {genocide-174 → genocide-175}/docs/pdf/EM_Ack_OTP-CR-117_19.pdf +0 -0
- {genocide-174 → genocide-175}/docs/pdf/EM_T04_OTP-CR-117_19.pdf +0 -0
- {genocide-174 → genocide-175}/docs/pdf/EM_T07_OTP-CR-117_19_001.pdf +0 -0
- {genocide-174 → genocide-175}/docs/pdf/Kamer.pdf +0 -0
- {genocide-174 → genocide-175}/docs/pdf/Rome-Statute.pdf +0 -0
- {genocide-174 → genocide-175}/docs/pdf/bevestigd.pdf +0 -0
- {genocide-174 → genocide-175}/docs/reconsider.rst +0 -0
- {genocide-174 → genocide-175}/docs/request.rst +0 -0
- {genocide-174 → genocide-175}/docs/robots.txt +0 -0
- {genocide-174 → genocide-175}/docs/skull3.png +0 -0
- {genocide-174 → genocide-175}/docs/verbatim7.png +0 -0
- {genocide-174 → genocide-175}/genocide/lock.py +0 -0
- {genocide-174 → genocide-175}/genocide/modules/cmd.py +0 -0
- {genocide-174 → genocide-175}/genocide/modules/req.py +0 -0
- {genocide-174 → genocide-175}/genocide/parse.py +0 -0
- {genocide-174 → genocide-175}/genocide/repeater.py +0 -0
- {genocide-174 → genocide-175}/genocide.egg-info/dependency_links.txt +0 -0
- {genocide-174 → genocide-175}/genocide.egg-info/requires.txt +0 -0
- {genocide-174 → genocide-175}/genocide.egg-info/top_level.txt +0 -0
- {genocide-174 → genocide-175}/genocide.egg-info/zip-safe +0 -0
- {genocide-174 → genocide-175}/setup.cfg +0 -0
- {genocide-174 → genocide-175}/setup.py +0 -0
|
@@ -32,7 +32,7 @@ stop), the prosecutor decided to call it a "no basis to proceed".
|
|
|
32
32
|
<center>
|
|
33
33
|
<b>
|
|
34
34
|
|
|
35
|
-
It requires a :ref:`basis to prosecute <
|
|
35
|
+
It requires a :ref:`basis to prosecute <home>` of the prosecutor
|
|
36
36
|
to get the king in his cell and his genocide, thereby, stopped.
|
|
37
37
|
|
|
38
38
|
.. raw:: html
|
|
Binary file
|
|
@@ -26,11 +26,6 @@
|
|
|
26
26
|
<lastmod>2024-07-05T07:45:34+00:00</lastmod>
|
|
27
27
|
<priority>0.80</priority>
|
|
28
28
|
</url>
|
|
29
|
-
<url>
|
|
30
|
-
<loc>https://genocide.readthedocs.io/reconsider.html</loc>
|
|
31
|
-
<lastmod>2024-07-01T03:58:23+00:00</lastmod>
|
|
32
|
-
<priority>0.64</priority>
|
|
33
|
-
</url>
|
|
34
29
|
<url>
|
|
35
30
|
<loc>https://genocide.readthedocs.io/request.html</loc>
|
|
36
31
|
<lastmod>2024-07-01T03:58:23+00:00</lastmod>
|
|
@@ -9,16 +9,14 @@
|
|
|
9
9
|
|
|
10
10
|
**NAME**
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
``GENOCIDE`` - Elderly, Handicapped, Criminals, Wicked
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
**SYNOPSIS**
|
|
16
16
|
|
|
17
17
|
::
|
|
18
18
|
|
|
19
|
-
genocide
|
|
20
|
-
genocidec [-i] [-v]
|
|
21
|
-
genocided
|
|
19
|
+
python3 -m genocide req
|
|
22
20
|
|
|
23
21
|
|
|
24
22
|
**DESCRIPTION**
|
|
@@ -56,50 +54,12 @@
|
|
|
56
54
|
$ pipx install genocide
|
|
57
55
|
$ pipx ensurepath
|
|
58
56
|
|
|
59
|
-
$ genocide srv > genocide.service
|
|
60
|
-
# mv *.service /etc/systemd/system/
|
|
61
|
-
# systemctl enable genocide --now
|
|
62
|
-
|
|
63
|
-
joins #genocide on localhost
|
|
64
|
-
|
|
65
57
|
|
|
66
58
|
**USAGE**
|
|
67
59
|
|
|
68
|
-
without any argument the bot does nothing
|
|
69
|
-
|
|
70
|
-
::
|
|
71
|
-
|
|
72
|
-
$ genocide
|
|
73
|
-
$
|
|
74
|
-
|
|
75
|
-
see list of commands
|
|
76
|
-
|
|
77
|
-
::
|
|
78
|
-
|
|
79
|
-
$ genocide cmd
|
|
80
|
-
cmd,req,skl,srv
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
start a console
|
|
84
|
-
|
|
85
|
-
::
|
|
86
|
-
|
|
87
|
-
$ genocidec
|
|
88
|
-
>
|
|
89
|
-
|
|
90
|
-
start daemon
|
|
91
|
-
|
|
92
60
|
::
|
|
93
61
|
|
|
94
|
-
$
|
|
95
|
-
$
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
show request to the prosecutor
|
|
99
|
-
|
|
100
|
-
::
|
|
101
|
-
|
|
102
|
-
$ genocide req
|
|
62
|
+
$ python3 -m genocide req
|
|
103
63
|
Information and Evidence Unit
|
|
104
64
|
Office of the Prosecutor
|
|
105
65
|
Post Office Box 19519
|
|
@@ -107,58 +67,11 @@
|
|
|
107
67
|
The Netherlands
|
|
108
68
|
|
|
109
69
|
|
|
110
|
-
**CONFIGURATION**
|
|
111
|
-
|
|
112
|
-
irc
|
|
113
|
-
|
|
114
|
-
::
|
|
115
|
-
|
|
116
|
-
$ genocide cfg server=<server>
|
|
117
|
-
$ genocide cfg channel=<channel>
|
|
118
|
-
$ genocide cfg nick=<nick>
|
|
119
|
-
|
|
120
|
-
sasl
|
|
121
|
-
|
|
122
|
-
::
|
|
123
|
-
|
|
124
|
-
$ genocide pwd <nsvnick> <nspass>
|
|
125
|
-
$ genocide cfg password=<frompwd>
|
|
126
|
-
|
|
127
|
-
rss
|
|
128
|
-
|
|
129
|
-
::
|
|
130
|
-
|
|
131
|
-
$ genocide rss <url>
|
|
132
|
-
$ genocide dpl <url> <item1,item2>
|
|
133
|
-
$ genocide rem <url>
|
|
134
|
-
$ genocide nme <url> <name>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
**COMMANDS**
|
|
138
|
-
|
|
139
|
-
::
|
|
140
|
-
|
|
141
|
-
cfg - irc configuration
|
|
142
|
-
cmd - commands
|
|
143
|
-
mre - displays cached output
|
|
144
|
-
pwd - sasl nickserv name/pass
|
|
145
|
-
req - reconsider
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
**SOURCE**
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
source is :ref:`here <source>`
|
|
152
|
-
|
|
153
|
-
|
|
154
70
|
**FILES**
|
|
155
71
|
|
|
156
72
|
::
|
|
157
73
|
|
|
158
74
|
~/.genocide
|
|
159
|
-
~/.local/bin/genocide
|
|
160
|
-
~/.local/bin/genocidec
|
|
161
|
-
~/.local/bin/genocided
|
|
162
75
|
~/.local/pipx/venvs/genocide/*
|
|
163
76
|
|
|
164
77
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# This file is placed in the Public Domain.
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
"main"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from .errors import errors
|
|
11
|
+
from .persist import skel
|
|
12
|
+
from .main import cmnd, enable, scan, wrap
|
|
13
|
+
from .parse import parse
|
|
14
|
+
from .runtime import Cfg
|
|
15
|
+
from .utils import modnames
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
from . import modules
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def main():
|
|
22
|
+
"main"
|
|
23
|
+
parse(Cfg, " ".join(sys.argv[1:]))
|
|
24
|
+
skel()
|
|
25
|
+
enable(print)
|
|
26
|
+
Cfg.dis = Cfg.sets.dis
|
|
27
|
+
Cfg.mod += "," + ",".join(modnames(modules))
|
|
28
|
+
scan(Cfg.mod, modules)
|
|
29
|
+
cmnd(Cfg.otxt, print)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def wrapped():
|
|
33
|
+
wrap(main)
|
|
34
|
+
errors()
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if __name__ == "__main__":
|
|
38
|
+
wrapped()
|
|
39
|
+
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# This file is placed in the Public Domain.
|
|
2
|
-
# pylint: disable=W0125
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
"client"
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
from .cache import Cache
|
|
9
7
|
from .cmds import Commands
|
|
8
|
+
from .object import Object
|
|
10
9
|
from .parse import parse
|
|
11
10
|
from .reactor import Reactor
|
|
12
11
|
|
|
@@ -15,7 +14,7 @@ class Client(Reactor):
|
|
|
15
14
|
|
|
16
15
|
"Client"
|
|
17
16
|
|
|
18
|
-
cache =
|
|
17
|
+
cache = Object()
|
|
19
18
|
out = None
|
|
20
19
|
|
|
21
20
|
def __init__(self, outer=None):
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# This file is placed in the Public Domain.
|
|
2
|
-
# pylint: disable=R0903
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
"commands"
|
|
@@ -26,7 +25,7 @@ class Commands:
|
|
|
26
25
|
setattr(Commands.modnames, func.__name__, func.__module__)
|
|
27
26
|
|
|
28
27
|
@staticmethod
|
|
29
|
-
def scan(mod)
|
|
28
|
+
def scan(mod):
|
|
30
29
|
"scan module for commands."
|
|
31
30
|
for key, cmd in inspect.getmembers(mod, inspect.isfunction):
|
|
32
31
|
if key.startswith("cb"):
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# This file is placed in the Public Domain.
|
|
2
|
-
# pylint: disable=R0911
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
"object encoder"
|
|
@@ -20,7 +19,7 @@ class ObjectEncoder(json.JSONEncoder):
|
|
|
20
19
|
def __init__(self, *args, **kwargs):
|
|
21
20
|
json.JSONEncoder.__init__(self, *args, **kwargs)
|
|
22
21
|
|
|
23
|
-
def default(self, o):
|
|
22
|
+
def default(self, o): # pylint: disable=R0911
|
|
24
23
|
"return stringable value."
|
|
25
24
|
if isinstance(o, dict):
|
|
26
25
|
return o.items()
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# This file is placed in the Public Domain.
|
|
2
|
-
# pylint: disable=W0125,E1102
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
"deferred exception handling"
|
|
@@ -35,7 +34,7 @@ class Errors:
|
|
|
35
34
|
def output(exc):
|
|
36
35
|
"check if output function is set."
|
|
37
36
|
if Errors.out:
|
|
38
|
-
Errors.out(Errors.format(exc))
|
|
37
|
+
Errors.out(Errors.format(exc)) # pylint: disable=E1102
|
|
39
38
|
|
|
40
39
|
|
|
41
40
|
def errors():
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# This file is placed in the Public Domain.
|
|
2
|
-
# pylint: disable=R0902
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
"event"
|
|
@@ -9,14 +8,16 @@ import threading
|
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
from .default import Default
|
|
11
|
+
from .object import Object
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class Event(Default):
|
|
14
|
+
class Event(Default, Object): # pylint: disable=R0902
|
|
15
15
|
|
|
16
16
|
"Event"
|
|
17
17
|
|
|
18
18
|
def __init__(self):
|
|
19
19
|
Default.__init__(self)
|
|
20
|
+
Object.__init__(self)
|
|
20
21
|
self._ready = threading.Event()
|
|
21
22
|
self._thr = None
|
|
22
23
|
self.orig = ""
|
|
@@ -6,11 +6,10 @@
|
|
|
6
6
|
"interface"
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
from . import
|
|
9
|
+
from . import client, cmds, decoder, encoder, errors, event, reactor
|
|
10
10
|
from . import log, object, parse, persist, repeater, thread, timer, utils
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
from .cache import *
|
|
14
13
|
from .client import *
|
|
15
14
|
from .cmds import *
|
|
16
15
|
from .decoder import *
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# This file is placed in the Public Domain.
|
|
2
|
-
# pylint: disable=R0903,W0125,E1102,E1103
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
"logging"
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
class Logging:
|
|
7
|
+
class Logging: # pylint: disable=R0903
|
|
9
8
|
|
|
10
9
|
"Logging"
|
|
11
10
|
|
|
@@ -19,7 +18,7 @@ def debug(txt):
|
|
|
19
18
|
if skp in txt:
|
|
20
19
|
return
|
|
21
20
|
if Logging.out:
|
|
22
|
-
Logging.out(txt)
|
|
21
|
+
Logging.out(txt) # pylint: disable=E1102
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
def __dir__():
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# This file is placed in the Public Domain.
|
|
2
|
-
# pylint: disable=W0718
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
"main"
|
|
@@ -7,7 +6,7 @@
|
|
|
7
6
|
|
|
8
7
|
from .client import Client, command
|
|
9
8
|
from .cmds import Commands
|
|
10
|
-
from .errors import Errors
|
|
9
|
+
from .errors import Errors, later
|
|
11
10
|
from .persist import Persist
|
|
12
11
|
from .event import Event
|
|
13
12
|
from .log import Logging
|
|
@@ -64,10 +63,21 @@ def scan(modstr, *pkgs, disable=""):
|
|
|
64
63
|
return mds
|
|
65
64
|
|
|
66
65
|
|
|
66
|
+
def wrap(func):
|
|
67
|
+
"catch exceptions"
|
|
68
|
+
try:
|
|
69
|
+
func()
|
|
70
|
+
except (KeyboardInterrupt, EOFError):
|
|
71
|
+
pass
|
|
72
|
+
except Exception as exc: # pylint: disable=W0718
|
|
73
|
+
later(exc)
|
|
74
|
+
|
|
75
|
+
|
|
67
76
|
def __dir__():
|
|
68
77
|
return (
|
|
69
78
|
'cmnd',
|
|
70
79
|
'enable',
|
|
71
80
|
'init',
|
|
72
|
-
'scan'
|
|
81
|
+
'scan',
|
|
82
|
+
'wrap'
|
|
73
83
|
)
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
# This file is placed in the Public Domain.
|
|
2
|
-
# pylint: disable=R0902,W0105
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
"a clean namespace"
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class Object:
|
|
7
|
+
class Object: # pylint: disable=R0902
|
|
12
8
|
|
|
13
9
|
"Object"
|
|
14
10
|
|
|
@@ -89,19 +85,6 @@ def fmt(obj, args=None, skip=None, plain=False):
|
|
|
89
85
|
return txt.strip()
|
|
90
86
|
|
|
91
87
|
|
|
92
|
-
def fqn(obj):
|
|
93
|
-
"return full qualified name of an object."
|
|
94
|
-
kin = str(type(obj)).split()[-1][1:-2]
|
|
95
|
-
if kin == "type":
|
|
96
|
-
kin = f"{obj.__module__}.{obj.__name__}"
|
|
97
|
-
return kin
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
def ident(obj):
|
|
101
|
-
"return an id for an object."
|
|
102
|
-
return pjoin(fqn(obj), *str(datetime.datetime.now()).split())
|
|
103
|
-
|
|
104
|
-
|
|
105
88
|
def items(obj):
|
|
106
89
|
"return the items of an object."
|
|
107
90
|
if isinstance(obj, type({})):
|
|
@@ -154,9 +137,6 @@ def values(obj):
|
|
|
154
137
|
return obj.__dict__.values()
|
|
155
138
|
|
|
156
139
|
|
|
157
|
-
"interface"
|
|
158
|
-
|
|
159
|
-
|
|
160
140
|
def pjoin(*args):
|
|
161
141
|
"path join."
|
|
162
142
|
return "/".join(args)
|
|
@@ -168,8 +148,6 @@ def __dir__():
|
|
|
168
148
|
'construct',
|
|
169
149
|
'edit',
|
|
170
150
|
'fmt',
|
|
171
|
-
'fqn',
|
|
172
|
-
'ident',
|
|
173
151
|
'items',
|
|
174
152
|
'keys',
|
|
175
153
|
'match',
|
|
@@ -13,9 +13,9 @@ import pathlib
|
|
|
13
13
|
from .decoder import read
|
|
14
14
|
from .default import Default
|
|
15
15
|
from .encoder import write
|
|
16
|
-
from .object import Object,
|
|
16
|
+
from .object import Object, search, update
|
|
17
17
|
from .lock import disklock
|
|
18
|
-
from .utils import fntime, strip
|
|
18
|
+
from .utils import fntime, fqn, ident, strip
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class Persist(Object):
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# This file is placed in the Public Domain.
|
|
2
|
-
# pylint: disable=W0212,W0718
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
"reactor"
|
|
@@ -30,10 +29,10 @@ class Reactor:
|
|
|
30
29
|
if not func:
|
|
31
30
|
evt.ready()
|
|
32
31
|
return
|
|
33
|
-
if "target" in dir(func) and func.target not in str(
|
|
32
|
+
if "target" in dir(func) and func.target not in str(self).lower():
|
|
34
33
|
evt.ready()
|
|
35
34
|
return
|
|
36
|
-
evt._thr = launch(func, self, evt)
|
|
35
|
+
evt._thr = launch(func, self, evt) # pylint: disable=W0212
|
|
37
36
|
|
|
38
37
|
def loop(self):
|
|
39
38
|
"proces events until interrupted."
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This file is placed in the Public Domain.
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
"runtime"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import getpass
|
|
8
|
+
import os
|
|
9
|
+
import time
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
from .default import Default
|
|
13
|
+
from .object import Object
|
|
14
|
+
from .persist import Persist
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
STARTTIME = time.time()
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Config(Default, Object): # pylint: disable=R0903
|
|
21
|
+
|
|
22
|
+
"configuration"
|
|
23
|
+
|
|
24
|
+
def __init__(self):
|
|
25
|
+
Default.__init__(self)
|
|
26
|
+
Object.__init__(self)
|
|
27
|
+
self.name = Config.__module__.rsplit(".", maxsplit=1)[-2]
|
|
28
|
+
self.user = getpass.getuser()
|
|
29
|
+
self.mod = "cmd,skl,req,srv"
|
|
30
|
+
self.wdr = os.path.expanduser(f"~/.{self.name}")
|
|
31
|
+
self.pidfile = os.path.join(self.wdr, f"{self.name}.pid")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
Cfg = Config()
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
Persist.workdir = Cfg.wdr
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# This file is placed in the Public Domain.
|
|
2
|
-
# pylint: disable=R0902,W0718
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
"threads"
|
|
@@ -53,7 +52,7 @@ class Thread(threading.Thread):
|
|
|
53
52
|
func, args = self.queue.get()
|
|
54
53
|
try:
|
|
55
54
|
self._result = func(*args)
|
|
56
|
-
except Exception as ex:
|
|
55
|
+
except Exception as ex: # pylint: disable=W0718
|
|
57
56
|
later(ex)
|
|
58
57
|
for arg in args:
|
|
59
58
|
if isinstance(arg, Event):
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# This file is placed in the Public Domain.
|
|
2
|
-
# pylint: disable=R0902
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
"at a specific time"
|
|
@@ -14,11 +13,12 @@ from .thread import launch
|
|
|
14
13
|
from .utils import named
|
|
15
14
|
|
|
16
15
|
|
|
17
|
-
class Timer(Object):
|
|
16
|
+
class Timer(Object): # pylint: disable=R0902
|
|
18
17
|
|
|
19
18
|
"Timer"
|
|
20
19
|
|
|
21
20
|
def __init__(self, sleep, func, *args, thrname=None):
|
|
21
|
+
Object.__init__(self)
|
|
22
22
|
self.args = args
|
|
23
23
|
self.func = func
|
|
24
24
|
self.sleep = sleep
|