Код: Выделить всё
if __name__ == "__main__":
cli(...)
Я пробовал
Код: Выделить всё
{
"name": "myentrypoint",
"type": "debugpy",
"request": "launch",
"module": "mymodule.cli",
"console": "integratedTerminal",
"args": [
"--arg1", "value1",
"--arg2", "value2"
],
"justMyCode": true
}
Это дает мне
Код: Выделить всё
/home/xxxxxx/projects/myproject/.venv/bin/python: Error while finding module specification for 'mymodule.cli' (ModuleNotFoundError: __path__ attribute not found on 'mymodule' while trying to find 'mymodule.cli')
Код: Выделить всё
[tool.poetry.scripts]
myentrypoint= 'mymodule:cli'
Код: Выделить всё
poetry run myentrypoint --arg1 "value1" --arg2 "value2Подробнее здесь: https://stackoverflow.com/questions/790 ... ing-python