pdoc
pdoc copied to clipboard
Allow users to invoke pdoc CLI with `python -m pdoc`
This is a question and/or enhancement request. I would like to invoke the pdoc
CLI via something like
python -m pdoc --html MyCode
Is this possible?
I ask because after pip-installing on Windows, pdoc
is on my path, but for some reason it's not registered with the OS as an executable. I get a prompt asking which program I'd like to use to open pdoc
as if it was a media file. It would be nice usage to be able to invoke pdoc
as written above.
We, in fact, have pdoc/__main__.py, added in https://github.com/pdoc3/pdoc/pull/8 for precisely the reason of making the module executable. Can you say whether it's a case of https://github.com/pdoc3/pdoc/issues/131?
When using poetry (automatically creating virtual-env and only install what is needed) as dependency management tool for installing and building, you can easily use what you expected:
Our CI runs:
poetry install
poetry run python -m pdoc --html my-project
Where pdoc3 is defined as dev-dependency in pyproject.toml