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
/
varLib
/
__main__.py
6 lines
91 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 varLib module callable
2016-10-13 15:43:19 -07:00
from
fontTools
.
varLib
import
main
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