This website requires JavaScript.
Explore
Help
Register
Sign In
shadowfacts
/
fonttools
Watch
1
Star
0
Fork
0
You've already forked fonttools
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
fonttools
/
Lib
/
fontTools
/
subset
/
__main__.py
7 lines
95 B
Python
Raw
Normal View
History
Unescape
Escape
don't use sys.exit(...) inside main(), but only under `if __name__ == "__main__"` The convention is that sys.exit(...) is called only if a module is run as a script, and that main() entry points use return statements to report exit codes: 0 (or None) for successful execution, or any non-zero integer for errors. E.g. see the console scripts generated when installing with pip.
2017-01-11 12:10:58 +00:00
import
sys
Make subset module callable
2016-10-13 15:42:14 -07:00
from
fontTools
.
subset
import
main
[doc] Add help options to fonttools CLI (#1920) This adds a `help` verb (and `--help` option) to the `fonttools` command line tool. Submodules will be listed in the help text if they have an importable `main` function with a docstring, and `main`'s docstring will be used as the one-line description for the help text.
2020-05-12 06:31:13 +01:00
Fixup
2016-10-13 15:59:25 -07:00
if
__name__
==
'
__main__
'
:
don't use sys.exit(...) inside main(), but only under `if __name__ == "__main__"` The convention is that sys.exit(...) is called only if a module is run as a script, and that main() entry points use return statements to report exit codes: 0 (or None) for successful execution, or any non-zero integer for errors. E.g. see the console scripts generated when installing with pip.
2017-01-11 12:10:58 +00:00
sys
.
exit
(
main
(
)
)
Reference in New Issue
Copy Permalink