MCPcopy Create free account
hub / github.com/ipython/ipython / config

Method config

IPython/core/magics/config.py:36–158  ·  view source on GitHub ↗

configure IPython %config Class[.trait=value] This magic exposes most of the IPython config system. Any Configurable class should be able to be configured with the simple line:: %config Class.trait=value Where `value` will be resolved in th

(self, s)

Source from the content-addressed store, hash-verified

34
35 @line_magic
36 def config(self, s):
37 """configure IPython
38
39 %config Class[.trait=value]
40
41 This magic exposes most of the IPython config system. Any
42 Configurable class should be able to be configured with the simple
43 line::
44
45 %config Class.trait=value
46
47 Where `value` will be resolved in the user's namespace, if it is an
48 expression or variable name.
49
50 Examples
51 --------
52
53 To see what classes are available for config, pass no arguments::
54
55 In [1]: %config
56 Available objects for config:
57 TerminalInteractiveShell
58 HistoryManager
59 PrefilterManager
60 AliasManager
61 IPCompleter
62 DisplayFormatter
63
64 To view what is configurable on a given class, just pass the class
65 name::
66
67 In [2]: %config IPCompleter
68 IPCompleter options
69 -----------------
70 IPCompleter.omit__names=<Enum>
71 Current: 2
72 Choices: (0, 1, 2)
73 Instruct the completer to omit private method names
74 Specifically, when completing on ``object.<tab>``.
75 When 2 [default]: all names that start with '_' will be excluded.
76 When 1: all 'magic' names (``__foo__``) will be excluded.
77 When 0: nothing will be excluded.
78 IPCompleter.merge_completions=<CBool>
79 Current: True
80 Whether to merge completion results into a single list
81 If False, only the completion results from the first non-empty
82 completer will be returned.
83 IPCompleter.limit_to__all__=<CBool>
84 Current: False
85 Instruct the completer to use __all__ for the completion
86 Specifically, when completing on ``object.<tab>``.
87 When True: only those names in obj.__all__ will be included.
88 When False [default]: the __all__ attribute is ignored
89 IPCompleter.greedy=<CBool>
90 Current: False
91 Activate greedy completion
92 This will enable completion on elements of lists, results of
93 function calls, etc., but can be unsafe because the code is

Callers

nothing calls this directly

Calls 1

UsageErrorClass · 0.90

Tested by

no test coverage detected