2012-02-25 13:39:38 +01:00
|
|
|
#!/usr/bin/env python
|
2012-07-26 06:37:03 +02:00
|
|
|
"""The main entry point. Invoke as `http' or `python -m httpie'.
|
2012-04-26 14:48:38 +02:00
|
|
|
|
2012-07-21 02:59:43 +02:00
|
|
|
"""
|
2012-07-23 19:35:44 +02:00
|
|
|
import sys
|
2012-02-25 13:39:38 +01:00
|
|
|
|
2012-03-04 11:29:55 +01:00
|
|
|
|
2016-10-26 11:21:30 +02:00
|
|
|
def main():
|
2016-10-26 11:16:34 +02:00
|
|
|
try:
|
|
|
|
from .core import main
|
2019-08-30 11:32:14 +02:00
|
|
|
exit_status = main()
|
2016-10-26 11:16:34 +02:00
|
|
|
except KeyboardInterrupt:
|
2016-10-26 11:53:01 +02:00
|
|
|
from . import ExitStatus
|
2019-08-30 11:32:14 +02:00
|
|
|
exit_status = ExitStatus.ERROR_CTRL_C
|
|
|
|
|
|
|
|
sys.exit(exit_status.value)
|
2016-10-26 11:21:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|