##// END OF EJS Templates
inherit base aliases / flags from traitlets.config.Application...
Min RK -
Show More
@@ -66,26 +66,48 b' else:'
66
66
67 # aliases and flags
67 # aliases and flags
68
68
69 base_aliases = {
69 base_aliases = {}
70 'profile-dir' : 'ProfileDir.location',
70 if isinstance(Application.aliases, dict):
71 'profile' : 'BaseIPythonApplication.profile',
71 # traitlets 5
72 'ipython-dir' : 'BaseIPythonApplication.ipython_dir',
72 base_aliases.update(Application.aliases)
73 'log-level' : 'Application.log_level',
73 base_aliases.update(
74 'config' : 'BaseIPythonApplication.extra_config_file',
74 {
75 "profile-dir": "ProfileDir.location",
76 "profile": "BaseIPythonApplication.profile",
77 "ipython-dir": "BaseIPythonApplication.ipython_dir",
78 "log-level": "Application.log_level",
79 "config": "BaseIPythonApplication.extra_config_file",
75 }
80 }
81 )
76
82
77 base_flags = dict(
83 base_flags = dict()
78 debug = ({'Application' : {'log_level' : logging.DEBUG}},
84 if isinstance(Application.flags, dict):
79 "set log level to logging.DEBUG (maximize logging output)"),
85 # traitlets 5
80 quiet = ({'Application' : {'log_level' : logging.CRITICAL}},
86 base_flags.update(Application.flags)
81 "set log level to logging.CRITICAL (minimize logging output)"),
87 base_flags.update(
82 init = ({'BaseIPythonApplication' : {
88 dict(
83 'copy_config_files' : True,
89 debug=(
84 'auto_create' : True}
90 {"Application": {"log_level": logging.DEBUG}},
85 }, """Initialize profile with default config files. This is equivalent
91 "set log level to logging.DEBUG (maximize logging output)",
92 ),
93 quiet=(
94 {"Application": {"log_level": logging.CRITICAL}},
95 "set log level to logging.CRITICAL (minimize logging output)",
96 ),
97 init=(
98 {
99 "BaseIPythonApplication": {
100 "copy_config_files": True,
101 "auto_create": True,
102 }
103 },
104 """Initialize profile with default config files. This is equivalent
86 to running `ipython profile create <profile>` prior to startup.
105 to running `ipython profile create <profile>` prior to startup.
87 """)
106 """,
107 ),
88 )
108 )
109 )
110
89
111
90 class ProfileAwareConfigLoader(PyFileConfigLoader):
112 class ProfileAwareConfigLoader(PyFileConfigLoader):
91 """A Python file config loader that is aware of IPython profiles."""
113 """A Python file config loader that is aware of IPython profiles."""
General Comments 0
You need to be logged in to leave comments. Login now