/ RNS / Utilities / __init__.py
__init__.py
 1  # Reticulum License
 2  #
 3  # Copyright (c) 2016-2025 Mark Qvist
 4  #
 5  # Permission is hereby granted, free of charge, to any person obtaining a copy
 6  # of this software and associated documentation files (the "Software"), to deal
 7  # in the Software without restriction, including without limitation the rights
 8  # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 9  # copies of the Software, and to permit persons to whom the Software is
10  # furnished to do so, subject to the following conditions:
11  #
12  # - The Software shall not be used in any kind of system which includes amongst
13  #   its functions the ability to purposefully do harm to human beings.
14  #
15  # - The Software shall not be used, directly or indirectly, in the creation of
16  #   an artificial intelligence, machine learning or language model training
17  #   dataset, including but not limited to any use that contributes to the
18  #   training or development of such a model or algorithm.
19  #
20  # - The above copyright notice and this permission notice shall be included in
21  #   all copies or substantial portions of the Software.
22  #
23  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24  # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26  # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29  # SOFTWARE.
30  
31  import os
32  import glob
33  
34  py_modules  = glob.glob(os.path.dirname(__file__)+"/*.py")
35  pyc_modules = glob.glob(os.path.dirname(__file__)+"/*.pyc")
36  modules     = py_modules+pyc_modules
37  __all__ = list(set([os.path.basename(f).replace(".pyc", "").replace(".py", "") for f in modules if not (f.endswith("__init__.py") or f.endswith("__init__.pyc"))]))