refs #0 The root commit.

This commit is contained in:
sbps-test user
2023-09-13 20:37:14 +03:00
commit 10eb607154
66 changed files with 1643 additions and 0 deletions

35
back/manage.py Normal file
View File

@@ -0,0 +1,35 @@
#!/usr/local/bin/python
from importlib import import_module
from click import argument, command
@command()
@argument("path")
def pyhelp(path: str):
"""
Вывести документацию к объекту.
"""
module_path = path.rsplit(".", 1)[0]
object_name = path.split(".")[-1]
try:
module = import_module(module_path)
except ModuleNotFoundError:
module = None
if module:
if module_path == object_name:
_object = module
else:
_object = getattr(module, object_name, None)
else:
_object = getattr(__builtins__, object_name, None)
if _object:
help(_object)
if __name__ == "__main__":
pyhelp()