forked from OpenBB-finance/OpenBB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
terminal.py
32 lines (22 loc) · 945 Bytes
/
terminal.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import sys
from multiprocessing import freeze_support
import openbb_terminal.config_terminal as cfg
# pylint:disable=unused-import,import-outside-toplevel
import openbb_terminal.core.session.current_system as syst # noqa: F401
import openbb_terminal.core.session.current_user as user # noqa: F401
from openbb_terminal.terminal_helper import is_auth_enabled, is_installer
def main():
sent_args = sys.argv[1:]
cfg.setup_config_terminal()
if "-t" in sent_args or "--test" in sent_args:
from openbb_terminal.core.integration_tests import integration_controller
integration_controller.main()
else:
from openbb_terminal.core.session import session_controller
if is_auth_enabled() and ("--login" in sys.argv[1:] or is_installer()):
session_controller.main()
else:
session_controller.launch_terminal()
if __name__ == "__main__":
freeze_support()
main()