On 20 Feb 2022, at 08:56, Eliot Lear <el+py@lear.ch> wrote:
Hi everyone,
I'm sure there's a clear answer, probably written some place obvious, but I wonder if there is a reason why certain functions are not linked to console_scripts. In particular I would think this would be good for json.tool (though I might call it something else, like pyjson_pp). Same with venv. I'm sure I'm missing something obvious.
You can use from the CLI like this for modules that a __main__.py has been provided. This includes pip, json, venv, tarfile and zip file (off the top of my head). python -m pip list python -m json <jaon-file> python -m venv etc. On windows you would use py not python for preference: py -m pip list etc. This is documented for the modules I named above. Is that what you are after? Barry