__main__.py 610 B

12345678910111213141516171819202122
  1. #!/usr/bin/env python
  2. #
  3. # Copyright (C) 2009-2020 the sqlparse authors and contributors
  4. # <see AUTHORS file>
  5. #
  6. # This module is part of python-sqlparse and is released under
  7. # the BSD License: https://opensource.org/licenses/BSD-3-Clause
  8. """Entrypoint module for `python -m sqlparse`.
  9. Why does this file exist, and why __main__? For more info, read:
  10. - https://www.python.org/dev/peps/pep-0338/
  11. - https://docs.python.org/2/using/cmdline.html#cmdoption-m
  12. - https://docs.python.org/3/using/cmdline.html#cmdoption-m
  13. """
  14. import sys
  15. from sqlparse.cli import main
  16. if __name__ == '__main__':
  17. sys.exit(main())