8 Commits

Author SHA1 Message Date
Just van Rossum
5fc65d7168
Misc py23 cleanups (#2243)
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes
2021-03-29 11:45:58 +02:00
Simon Cozens
2cef07af80
[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
Cosimo Lupo
d91724d76c
Revert "[doc] Add help options to fonttools CLI" 2020-05-04 17:37:24 +01:00
Simon Cozens
02f23a214c [doc] Add help options to fonttools CLI 2020-05-03 22:59:54 +01:00
Nikolaus Waxweiler
01328213c7 Remove __future__ imports 2019-08-09 12:20:13 +01:00
Cosimo Lupo
b7bb391033
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
Behdad Esfahbod
72f5cb8579 Fixup 2016-10-13 15:59:25 -07:00
Behdad Esfahbod
4158b54244 Make subset module callable 2016-10-13 15:42:14 -07:00