2012-07-26 07:37:03 +03:00
|
|
|
"""The main entry point. Invoke as `http' or `python -m httpie'.
|
2012-04-26 15:48:38 +03:00
|
|
|
|
2012-07-21 03:59:43 +03:00
|
|
|
"""
|
2012-02-25 15:39:38 +03:00
|
|
|
|
2012-03-04 13:29:55 +03:00
|
|
|
|
2016-10-26 11:21:30 +02:00
|
|
|
def main():
|
2016-10-26 11:16:34 +02:00
|
|
|
try:
|
2021-05-05 14:13:39 +02:00
|
|
|
from httpie.core import main
|
2019-08-30 11:32:14 +02:00
|
|
|
exit_status = main()
|
2016-10-26 11:16:34 +02:00
|
|
|
except KeyboardInterrupt:
|
2019-09-16 13:26:18 +02:00
|
|
|
from httpie.status import ExitStatus
|
2019-08-30 11:32:14 +02:00
|
|
|
exit_status = ExitStatus.ERROR_CTRL_C
|
|
|
|
|
2021-08-06 16:57:19 +02:00
|
|
|
return exit_status.value
|
2016-10-26 11:21:30 +02:00
|
|
|
|
|
|
|
|
2021-08-06 16:57:19 +02:00
|
|
|
if __name__ == '__main__': # pragma: nocover
|
|
|
|
import sys
|
|
|
|
sys.exit(main())
|