Allow invocation through runpy
jaraco opened this issue · 1 comments
Currently, it's only possible to invoke termtosvg through its script, meaning the package must be installed somewhere with a PATH-exposed bin/Scripts directory. It would be nice to be able to invoke it also through runpy (python -m termtosvg
). Currently, if one invokes that command, the following error occurs:
/usr/local/bin/python: No module named termtosvg.__main__; 'termtosvg' is a package and cannot be directly executed
Instead, I'd expect that command to invoke termtosvg
directly from the indicated Python interpreter. This method of invocation would allow for a couple of use cases currently not supported, including:
- Invocation via pip-run
- Selective invocation from different Python interpreters (e.g.
python3.6 -m termtosvg
)
I notice there's already a __main__
in the root directory of the project, but it's not distributed with the package. I wonder if that file intended to serve this same purpose.
Good idea, thanks. I removed __main__.py
from the root directory since this file seemed useless.