kisstdlib 0.0.1__tar.gz → 0.0.2__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.
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/PKG-INFO +1 -1
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/__init__.py +2 -6
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/argparse/__init__.py +2 -6
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/argparse/better.py +6 -6
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/exceptions.py +2 -6
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/io/__init__.py +2 -6
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/io/base.py +2 -6
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/io/encoder/__init__.py +2 -6
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/io/encoder/base.py +2 -6
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/io/encoder/pyrepr.py +2 -6
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/io/wrapper.py +2 -6
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/logging.py +2 -6
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/path.py +7 -9
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib.egg-info/PKG-INFO +1 -1
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/pyproject.toml +1 -1
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/README.md +0 -0
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib/py.typed +0 -0
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib.egg-info/SOURCES.txt +0 -0
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib.egg-info/dependency_links.txt +0 -0
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/kisstdlib.egg-info/top_level.txt +0 -0
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/setup.cfg +0 -0
- {kisstdlib-0.0.1 → kisstdlib-0.0.2}/setup.py +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
1
3
|
# Copyright (c) 2018-2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
4
|
#
|
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,9 +19,3 @@
|
|
|
17
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
21
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
1
3
|
# Copyright (c) 2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
4
|
#
|
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,11 +19,5 @@
|
|
|
17
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
21
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
26
22
|
|
|
27
23
|
from .better import *
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
3
|
+
# This file can be distributed under the terms of the MIT-style license given
|
|
4
|
+
# below or Python Software Foundation License version 2 (PSF-2.0) as published
|
|
5
|
+
# by Python Software Foundation.
|
|
6
|
+
#
|
|
1
7
|
# Copyright (c) 2022-2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
8
|
#
|
|
3
9
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,12 +23,6 @@
|
|
|
17
23
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
24
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
25
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
26
26
|
|
|
27
27
|
import typing as _t
|
|
28
28
|
from argparse import *
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
1
3
|
# Copyright (c) 2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
4
|
#
|
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,12 +19,6 @@
|
|
|
17
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
21
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
26
22
|
|
|
27
23
|
"""Exceptions with printable descriptions.
|
|
28
24
|
"""
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
1
3
|
# Copyright (c) 2018-2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
4
|
#
|
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,12 +19,6 @@
|
|
|
17
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
21
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
26
22
|
|
|
27
23
|
"""KISS IO File Object hierarchy.
|
|
28
24
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
1
3
|
# Copyright (c) 2018-2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
4
|
#
|
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,12 +19,6 @@
|
|
|
17
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
21
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
26
22
|
|
|
27
23
|
import abc as _abc
|
|
28
24
|
import sys as _sys
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
1
3
|
# Copyright (c) 2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
4
|
#
|
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,12 +19,6 @@
|
|
|
17
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
21
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
26
22
|
|
|
27
23
|
from .base import *
|
|
28
24
|
from .pyrepr import *
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
1
3
|
# Copyright (c) 2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
4
|
#
|
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,12 +19,6 @@
|
|
|
17
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
21
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
26
22
|
|
|
27
23
|
import sys as _sys
|
|
28
24
|
import typing as _t
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
1
3
|
# Copyright (c) 2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
4
|
#
|
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,12 +19,6 @@
|
|
|
17
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
21
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
26
22
|
|
|
27
23
|
"""cbor2-style encoder for Pythonic Object Representation (repr)
|
|
28
24
|
"""
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
1
3
|
# Copyright (c) 2018-2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
4
|
#
|
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,12 +19,6 @@
|
|
|
17
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
21
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
26
22
|
|
|
27
23
|
import logging as _logging
|
|
28
24
|
import os as _os
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
1
3
|
# Copyright (c) 2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
4
|
#
|
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,12 +19,6 @@
|
|
|
17
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
21
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
26
22
|
|
|
27
23
|
import logging as _logging
|
|
28
24
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This file is a part of kisstdlib project.
|
|
2
|
+
#
|
|
1
3
|
# Copyright (c) 2018-2023 Jan Malakhovski <oxij@oxij.org>
|
|
2
4
|
#
|
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -17,12 +19,6 @@
|
|
|
17
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
21
|
# SOFTWARE.
|
|
20
|
-
#
|
|
21
|
-
# This file is a part of kisstdlib project.
|
|
22
|
-
#
|
|
23
|
-
# This file can be distributed under the terms of the above MIT license or
|
|
24
|
-
# Python Software Foundation License version 2 (PSF-2.0) as published by Python
|
|
25
|
-
# Software Foundation.
|
|
26
22
|
|
|
27
23
|
import logging as _logging
|
|
28
24
|
import os as _os
|
|
@@ -32,10 +28,11 @@ import typing as _t
|
|
|
32
28
|
def walk_orderly(path : _t.AnyStr,
|
|
33
29
|
include_directories : bool = True,
|
|
34
30
|
follow_symlinks : bool = True,
|
|
31
|
+
order_by : bool | None = True,
|
|
35
32
|
handle_error : _t.Callable[..., None] | None = _logging.error) -> _t.Iterable[_t.AnyStr]:
|
|
36
33
|
"""Similar to os.walk, but produces an iterator over plain file paths, allows
|
|
37
34
|
non-directories as input (which will just output a single element), and
|
|
38
|
-
the output is guaranteed to be ordered
|
|
35
|
+
the output is guaranteed to be ordered if `order_by` is not `None`.
|
|
39
36
|
"""
|
|
40
37
|
|
|
41
38
|
try:
|
|
@@ -88,13 +85,14 @@ def walk_orderly(path : _t.AnyStr,
|
|
|
88
85
|
else:
|
|
89
86
|
elements.append(entry.path)
|
|
90
87
|
|
|
91
|
-
|
|
88
|
+
if order_by is not None:
|
|
89
|
+
elements.sort(reverse=not order_by)
|
|
92
90
|
|
|
93
91
|
for path in elements:
|
|
94
92
|
lchar : _t.AnyStr = path[-1:]
|
|
95
93
|
if lchar == "/" or lchar == b"/":
|
|
96
94
|
if include_directories:
|
|
97
95
|
yield path
|
|
98
|
-
yield from walk_orderly(path, include_directories, follow_symlinks, handle_error)
|
|
96
|
+
yield from walk_orderly(path, include_directories, follow_symlinks, order_by, handle_error)
|
|
99
97
|
else:
|
|
100
98
|
yield path
|
|
@@ -3,7 +3,7 @@ requires = ["setuptools"]
|
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
[project]
|
|
5
5
|
name = "kisstdlib"
|
|
6
|
-
version = "0.0.
|
|
6
|
+
version = "0.0.2"
|
|
7
7
|
authors = [{ name = "Jan Malakhovski", email = "oxij@oxij.org" }]
|
|
8
8
|
description = "Keep It Simple STandarD LIBraries set for Python"
|
|
9
9
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|