CoCalc Public Files.sage / ipython-4.0.0 / profile_default / ipython_config.pyOpen with one click!
Authors: Gihan Marasingha, Harald Schilly, ℏal Snyder, William A. Stein
Views : 76
Compute Environment: Ubuntu 18.04 (Deprecated)
1
# Configuration file for ipython.
2
3
#------------------------------------------------------------------------------
4
# Configurable configuration
5
#------------------------------------------------------------------------------
6
7
#------------------------------------------------------------------------------
8
# InteractiveShellApp configuration
9
#------------------------------------------------------------------------------
10
11
# A Mixin for applications that start InteractiveShell instances.
12
#
13
# Provides configurables for loading extensions and executing files as part of
14
# configuring a Shell environment.
15
#
16
# The following methods should be called by the :meth:`initialize` method of the
17
# subclass:
18
#
19
# - :meth:`init_path`
20
# - :meth:`init_shell` (to be implemented by the subclass)
21
# - :meth:`init_gui_pylab`
22
# - :meth:`init_extensions`
23
# - :meth:`init_code`
24
25
# Execute the given command string.
26
# c.InteractiveShellApp.code_to_run = ''
27
28
# Reraise exceptions encountered loading IPython extensions?
29
# c.InteractiveShellApp.reraise_ipython_extension_failures = False
30
31
# Run the file referenced by the PYTHONSTARTUP environment variable at IPython
32
# startup.
33
# c.InteractiveShellApp.exec_PYTHONSTARTUP = True
34
35
# lines of code to run at IPython startup.
36
# c.InteractiveShellApp.exec_lines = traitlets.Undefined
37
38
# Enable GUI event loop integration with any of ('glut', 'gtk', 'gtk3', 'osx',
39
# 'pyglet', 'qt', 'qt5', 'tk', 'wx').
40
# c.InteractiveShellApp.gui = None
41
42
# Pre-load matplotlib and numpy for interactive use, selecting a particular
43
# matplotlib backend and loop integration.
44
# c.InteractiveShellApp.pylab = None
45
46
# Configure matplotlib for interactive use with the default matplotlib backend.
47
# c.InteractiveShellApp.matplotlib = None
48
49
# If true, IPython will populate the user namespace with numpy, pylab, etc. and
50
# an ``import *`` is done from numpy and pylab, when using pylab mode.
51
#
52
# When False, pylab mode should not import any names into the user namespace.
53
# c.InteractiveShellApp.pylab_import_all = True
54
55
# A list of dotted module names of IPython extensions to load.
56
# c.InteractiveShellApp.extensions = traitlets.Undefined
57
58
# Run the module as a script.
59
# c.InteractiveShellApp.module_to_run = ''
60
61
# Should variables loaded at startup (by startup files, exec_lines, etc.) be
62
# hidden from tools like %who?
63
# c.InteractiveShellApp.hide_initial_ns = True
64
65
# dotted module name of an IPython extension to load.
66
# c.InteractiveShellApp.extra_extension = ''
67
68
# List of files to run at IPython startup.
69
# c.InteractiveShellApp.exec_files = traitlets.Undefined
70
71
# A file to be run
72
# c.InteractiveShellApp.file_to_run = ''
73
74
#------------------------------------------------------------------------------
75
# SingletonConfigurable configuration
76
#------------------------------------------------------------------------------
77
78
# A configurable that only allows one instance.
79
#
80
# This class is for classes that should only have one instance of itself or
81
# *any* subclass. To create and retrieve such a class use the
82
# :meth:`SingletonConfigurable.instance` method.
83
84
#------------------------------------------------------------------------------
85
# Application configuration
86
#------------------------------------------------------------------------------
87
88
# This is an application.
89
90
# The date format used by logging formatters for %(asctime)s
91
# c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S'
92
93
# The Logging format template
94
# c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s'
95
96
# Set the log level by value or name.
97
# c.Application.log_level = 30
98
99
#------------------------------------------------------------------------------
100
# BaseIPythonApplication configuration
101
#------------------------------------------------------------------------------
102
103
# IPython: an enhanced interactive Python shell.
104
105
# The IPython profile to use.
106
# c.BaseIPythonApplication.profile = u'default'
107
108
# Path to an extra config file to load.
109
#
110
# If specified, load this config file in addition to any other IPython config.
111
# c.BaseIPythonApplication.extra_config_file = u''
112
113
# Create a massive crash report when IPython encounters what may be an internal
114
# error. The default is to append a short message to the usual traceback
115
# c.BaseIPythonApplication.verbose_crash = False
116
117
# The name of the IPython directory. This directory is used for logging
118
# configuration (through profiles), history storage, etc. The default is usually
119
# $HOME/.ipython. This option can also be specified through the environment
120
# variable IPYTHONDIR.
121
# c.BaseIPythonApplication.ipython_dir = u''
122
123
# Whether to install the default config files into the profile dir. If a new
124
# profile is being created, and IPython contains config files for that profile,
125
# then they will be staged into the new directory. Otherwise, default config
126
# files will be automatically generated.
127
# c.BaseIPythonApplication.copy_config_files = False
128
129
# Whether to create profile dir if it doesn't exist
130
# c.BaseIPythonApplication.auto_create = False
131
132
# Whether to overwrite existing config files when copying
133
# c.BaseIPythonApplication.overwrite = False
134
135
#------------------------------------------------------------------------------
136
# TerminalIPythonApp configuration
137
#------------------------------------------------------------------------------
138
139
# If a command or file is given via the command-line, e.g. 'ipython foo.py',
140
# start an interactive shell after executing the file or command.
141
# c.TerminalIPythonApp.force_interact = False
142
143
# Whether to display a banner upon starting IPython.
144
# c.TerminalIPythonApp.display_banner = True
145
146
# Start IPython quickly by skipping the loading of config files.
147
# c.TerminalIPythonApp.quick = False
148
149
#------------------------------------------------------------------------------
150
# InteractiveShell configuration
151
#------------------------------------------------------------------------------
152
153
# An enhanced, interactive shell for Python.
154
155
# Use colors for displaying information about objects. Because this information
156
# is passed through a pager (like 'less'), and some pagers get confused with
157
# color codes, this capability can be turned off.
158
# c.InteractiveShell.color_info = True
159
160
# A list of ast.NodeTransformer subclass instances, which will be applied to
161
# user input before code is run.
162
# c.InteractiveShell.ast_transformers = traitlets.Undefined
163
164
#
165
# c.InteractiveShell.history_length = 10000
166
167
# Don't call post-execute functions that have failed in the past.
168
# c.InteractiveShell.disable_failing_post_execute = False
169
170
# Show rewritten input, e.g. for autocall.
171
# c.InteractiveShell.show_rewritten_input = True
172
173
# Set the color scheme (NoColor, Linux, or LightBG).
174
# c.InteractiveShell.colors = 'Linux'
175
176
# If True, anything that would be passed to the pager will be displayed as
177
# regular output instead.
178
# c.InteractiveShell.display_page = False
179
180
# Autoindent IPython code entered interactively.
181
# c.InteractiveShell.autoindent = True
182
183
#
184
# c.InteractiveShell.separate_in = '\n'
185
186
#
187
# c.InteractiveShell.xmode = 'Context'
188
189
# Enable magic commands to be called without the leading %.
190
# c.InteractiveShell.automagic = True
191
192
# Deprecated, use PromptManager.in2_template
193
# c.InteractiveShell.prompt_in2 = ' .\\D.: '
194
195
#
196
# c.InteractiveShell.separate_out = ''
197
198
# Deprecated, use PromptManager.in_template
199
# c.InteractiveShell.prompt_in1 = 'In [\\#]: '
200
201
# **Deprecated**
202
#
203
# Enable deep (recursive) reloading by default. IPython can use the deep_reload
204
# module which reloads changes in modules recursively (it replaces the reload()
205
# function, so you don't need to change anything to use it). `deep_reload`
206
# forces a full reload of modules whose code may have changed, which the default
207
# reload() function does not. When deep_reload is off, IPython will use the
208
# normal reload(), but deep_reload will still be available as dreload().
209
# c.InteractiveShell.deep_reload = False
210
211
# The number of saved history entries to be loaded into the readline buffer at
212
# startup.
213
# c.InteractiveShell.history_load_length = 1000
214
215
#
216
# c.InteractiveShell.separate_out2 = ''
217
218
# Deprecated, use PromptManager.justify
219
# c.InteractiveShell.prompts_pad_left = True
220
221
# The part of the banner to be printed before the profile
222
# c.InteractiveShell.banner1 = 'Python 2.7.9 (default, Sep 22 2015, 12:04:36) \nType "copyright", "credits" or "license" for more information.\n\nIPython 4.0.0 -- An enhanced Interactive Python.\n? -> Introduction and overview of IPython\'s features.\n%quickref -> Quick reference.\nhelp -> Python\'s own help system.\nobject? -> Details about \'object\', use \'object??\' for extra details.\n'
223
224
#
225
# c.InteractiveShell.readline_parse_and_bind = traitlets.Undefined
226
227
#print c.InteractiveShell.readline_parse_and_bind
228
229
c.InteractiveShell.readline_parse_and_bind = ['tab:complete']
230
#c.InteractiveShell.readline_parse_and_bind = ['tab:menu-complete']
231
232
# The part of the banner to be printed after the profile
233
# c.InteractiveShell.banner2 = ''
234
235
# Set the size of the output cache. The default is 1000, you can change it
236
# permanently in your config file. Setting it to 0 completely disables the
237
# caching system, and the minimum value accepted is 20 (if you provide a value
238
# less than 20, it is reset to 0 and a warning is issued). This limit is
239
# defined because otherwise you'll spend more time re-flushing a too small cache
240
# than working
241
# c.InteractiveShell.cache_size = 1000
242
243
#
244
# c.InteractiveShell.object_info_string_level = 0
245
246
#
247
# c.InteractiveShell.ipython_dir = ''
248
249
#
250
# c.InteractiveShell.readline_remove_delims = '-/~'
251
252
# Start logging to the default log file in overwrite mode. Use `logappend` to
253
# specify a log file to **append** logs to.
254
# c.InteractiveShell.logstart = False
255
256
# The name of the logfile to use.
257
# c.InteractiveShell.logfile = ''
258
259
#
260
# c.InteractiveShell.wildcards_case_sensitive = True
261
262
# Save multi-line entries as one entry in readline history
263
# c.InteractiveShell.multiline_history = True
264
265
#
266
# c.InteractiveShell.readline_use = True
267
268
# Start logging to the given file in append mode. Use `logfile` to specify a log
269
# file to **overwrite** logs to.
270
# c.InteractiveShell.logappend = ''
271
272
# Make IPython automatically call any callable object even if you didn't type
273
# explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically.
274
# The value can be '0' to disable the feature, '1' for 'smart' autocall, where
275
# it is not applied if there are no more arguments on the line, and '2' for
276
# 'full' autocall, where all callable objects are automatically called (even if
277
# no arguments are present).
278
# c.InteractiveShell.autocall = 0
279
280
#
281
# c.InteractiveShell.quiet = False
282
283
# Deprecated, use PromptManager.out_template
284
# c.InteractiveShell.prompt_out = 'Out[\\#]: '
285
286
#
287
# c.InteractiveShell.debug = False
288
289
# 'all', 'last', 'last_expr' or 'none', specifying which nodes should be run
290
# interactively (displaying output from expressions).
291
# c.InteractiveShell.ast_node_interactivity = 'last_expr'
292
293
# Automatically call the pdb debugger after every exception.
294
# c.InteractiveShell.pdb = False
295
296
#------------------------------------------------------------------------------
297
# TerminalInteractiveShell configuration
298
#------------------------------------------------------------------------------
299
300
# auto editing of files with syntax errors.
301
# c.TerminalInteractiveShell.autoedit_syntax = False
302
303
# Number of lines of your screen, used to control printing of very long strings.
304
# Strings longer than this number of lines will be sent through a pager instead
305
# of directly printed. The default value for this is 0, which means IPython
306
# will auto-detect your screen size every time it needs to print certain
307
# potentially long strings (this doesn't change the behavior of the 'print'
308
# keyword, it's only triggered internally). If for some reason this isn't
309
# working well (it needs curses support), specify it yourself. Otherwise don't
310
# change the default.
311
# c.TerminalInteractiveShell.screen_length = 0
312
313
# Enable auto setting the terminal title.
314
# c.TerminalInteractiveShell.term_title = False
315
316
# Set to confirm when you try to exit IPython with an EOF (Control-D in Unix,
317
# Control-Z/Enter in Windows). By typing 'exit' or 'quit', you can force a
318
# direct exit without any confirmation.
319
# c.TerminalInteractiveShell.confirm_exit = True
320
321
# Set the editor used by IPython (default to $EDITOR/vi/notepad).
322
# c.TerminalInteractiveShell.editor = 'vi'
323
324
# The shell program to be used for paging.
325
# c.TerminalInteractiveShell.pager = 'less'
326
327
#------------------------------------------------------------------------------
328
# PromptManager configuration
329
#------------------------------------------------------------------------------
330
331
# This is the primary interface for producing IPython's prompts.
332
333
# Output prompt. '\#' will be transformed to the prompt number
334
# c.PromptManager.out_template = 'Out[\\#]: '
335
336
# Continuation prompt.
337
# c.PromptManager.in2_template = ' .\\D.: '
338
339
#
340
# c.PromptManager.color_scheme = 'Linux'
341
342
# Input prompt. '\#' will be transformed to the prompt number
343
# c.PromptManager.in_template = 'Foo [\\#]: '
344
345
# If True (default), each prompt will be right-aligned with the preceding one.
346
# c.PromptManager.justify = True
347
348
#------------------------------------------------------------------------------
349
# HistoryAccessorBase configuration
350
#------------------------------------------------------------------------------
351
352
# An abstract class for History Accessors
353
354
#------------------------------------------------------------------------------
355
# HistoryAccessor configuration
356
#------------------------------------------------------------------------------
357
358
# Access the history database without adding to it.
359
#
360
# This is intended for use by standalone history tools. IPython shells use
361
# HistoryManager, below, which is a subclass of this.
362
363
# Path to file to use for SQLite history database.
364
#
365
# By default, IPython will put the history database in the IPython profile
366
# directory. If you would rather share one history among profiles, you can set
367
# this value in each, so that they are consistent.
368
#
369
# Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts.
370
# If you see IPython hanging, try setting this to something on a local disk,
371
# e.g::
372
#
373
# ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite
374
# c.HistoryAccessor.hist_file = u''
375
376
# enable the SQLite history
377
#
378
# set enabled=False to disable the SQLite history, in which case there will be
379
# no stored history, no SQLite connection, and no background saving thread.
380
# This may be necessary in some threaded environments where IPython is embedded.
381
# c.HistoryAccessor.enabled = True
382
383
# Options for configuring the SQLite connection
384
#
385
# These options are passed as keyword args to sqlite3.connect when establishing
386
# database conenctions.
387
# c.HistoryAccessor.connection_options = traitlets.Undefined
388
389
#------------------------------------------------------------------------------
390
# HistoryManager configuration
391
#------------------------------------------------------------------------------
392
393
# A class to organize all history-related functionality in one place.
394
395
# Should the history database include output? (default: no)
396
# c.HistoryManager.db_log_output = False
397
398
# Write to database every x commands (higher values save disk access & power).
399
# Values of 1 or less effectively disable caching.
400
# c.HistoryManager.db_cache_size = 0
401
402
#------------------------------------------------------------------------------
403
# LoggingConfigurable configuration
404
#------------------------------------------------------------------------------
405
406
# A parent class for Configurables that log.
407
#
408
# Subclasses have a log trait, and the default behavior is to get the logger
409
# from the currently running Application.
410
411
#------------------------------------------------------------------------------
412
# ProfileDir configuration
413
#------------------------------------------------------------------------------
414
415
# An object to manage the profile directory and its resources.
416
#
417
# The profile directory is used by all IPython applications, to manage
418
# configuration, logging and security.
419
#
420
# This object knows how to find, create and manage these directories. This
421
# should be used by any code that wants to handle profiles.
422
423
# Set the profile location directly. This overrides the logic used by the
424
# `profile` option.
425
# c.ProfileDir.location = u''
426
427
#------------------------------------------------------------------------------
428
# BaseFormatter configuration
429
#------------------------------------------------------------------------------
430
431
# A base formatter class that is configurable.
432
#
433
# This formatter should usually be used as the base class of all formatters. It
434
# is a traited :class:`Configurable` class and includes an extensible API for
435
# users to determine how their objects are formatted. The following logic is
436
# used to find a function to format an given object.
437
#
438
# 1. The object is introspected to see if it has a method with the name
439
# :attr:`print_method`. If is does, that object is passed to that method
440
# for formatting.
441
# 2. If no print method is found, three internal dictionaries are consulted
442
# to find print method: :attr:`singleton_printers`, :attr:`type_printers`
443
# and :attr:`deferred_printers`.
444
#
445
# Users should use these dictionaries to register functions that will be used to
446
# compute the format data for their objects (if those objects don't have the
447
# special print methods). The easiest way of using these dictionaries is through
448
# the :meth:`for_type` and :meth:`for_type_by_name` methods.
449
#
450
# If no function/callable is found to compute the format data, ``None`` is
451
# returned and this format type is not used.
452
453
#
454
# c.BaseFormatter.type_printers = traitlets.Undefined
455
456
#
457
# c.BaseFormatter.deferred_printers = traitlets.Undefined
458
459
#
460
# c.BaseFormatter.enabled = True
461
462
#
463
# c.BaseFormatter.singleton_printers = traitlets.Undefined
464
465
#------------------------------------------------------------------------------
466
# PlainTextFormatter configuration
467
#------------------------------------------------------------------------------
468
469
# The default pretty-printer.
470
#
471
# This uses :mod:`IPython.lib.pretty` to compute the format data of the object.
472
# If the object cannot be pretty printed, :func:`repr` is used. See the
473
# documentation of :mod:`IPython.lib.pretty` for details on how to write pretty
474
# printers. Here is a simple example::
475
#
476
# def dtype_pprinter(obj, p, cycle):
477
# if cycle:
478
# return p.text('dtype(...)')
479
# if hasattr(obj, 'fields'):
480
# if obj.fields is None:
481
# p.text(repr(obj))
482
# else:
483
# p.begin_group(7, 'dtype([')
484
# for i, field in enumerate(obj.descr):
485
# if i > 0:
486
# p.text(',')
487
# p.breakable()
488
# p.pretty(field)
489
# p.end_group(7, '])')
490
491
#
492
# c.PlainTextFormatter.newline = '\n'
493
494
#
495
# c.PlainTextFormatter.float_precision = ''
496
497
#
498
# c.PlainTextFormatter.verbose = False
499
500
# Truncate large collections (lists, dicts, tuples, sets) to this size.
501
#
502
# Set to 0 to disable truncation.
503
# c.PlainTextFormatter.max_seq_length = 1000
504
505
#
506
# c.PlainTextFormatter.max_width = 79
507
508
#
509
# c.PlainTextFormatter.pprint = True
510
511
#------------------------------------------------------------------------------
512
# Completer configuration
513
#------------------------------------------------------------------------------
514
515
# Activate greedy completion
516
#
517
# This will enable completion on elements of lists, results of function calls,
518
# etc., but can be unsafe because the code is actually evaluated on TAB.
519
# c.Completer.greedy = False
520
521
#------------------------------------------------------------------------------
522
# IPCompleter configuration
523
#------------------------------------------------------------------------------
524
525
# Extension of the completer class with IPython-specific features
526
527
# Instruct the completer to omit private method names
528
#
529
# Specifically, when completing on ``object.<tab>``.
530
#
531
# When 2 [default]: all names that start with '_' will be excluded.
532
#
533
# When 1: all 'magic' names (``__foo__``) will be excluded.
534
#
535
# When 0: nothing will be excluded.
536
# c.IPCompleter.omit__names = 2
537
538
# Whether to merge completion results into a single list
539
#
540
# If False, only the completion results from the first non-empty completer will
541
# be returned.
542
# c.IPCompleter.merge_completions = True
543
544
# Instruct the completer to use __all__ for the completion
545
#
546
# Specifically, when completing on ``object.<tab>``.
547
#
548
# When True: only those names in obj.__all__ will be included.
549
#
550
# When False [default]: the __all__ attribute is ignored
551
# c.IPCompleter.limit_to__all__ = False
552
553
#------------------------------------------------------------------------------
554
# Magics configuration
555
#------------------------------------------------------------------------------
556
557
# Base class for implementing magic functions.
558
#
559
# Shell functions which can be reached as %function_name. All magic functions
560
# should accept a string, which they can parse for their own needs. This can
561
# make some functions easier to type, eg `%cd ../` vs. `%cd("../")`
562
#
563
# Classes providing magic functions need to subclass this class, and they MUST:
564
#
565
# - Use the method decorators `@line_magic` and `@cell_magic` to decorate
566
# individual methods as magic functions, AND
567
#
568
# - Use the class decorator `@magics_class` to ensure that the magic
569
# methods are properly registered at the instance level upon instance
570
# initialization.
571
#
572
# See :mod:`magic_functions` for examples of actual implementation classes.
573
574
#------------------------------------------------------------------------------
575
# ScriptMagics configuration
576
#------------------------------------------------------------------------------
577
578
# Magics for talking to scripts
579
#
580
# This defines a base `%%script` cell magic for running a cell with a program in
581
# a subprocess, and registers a few top-level magics that call %%script with
582
# common interpreters.
583
584
# Extra script cell magics to define
585
#
586
# This generates simple wrappers of `%%script foo` as `%%foo`.
587
#
588
# If you want to add script magics that aren't on your path, specify them in
589
# script_paths
590
# c.ScriptMagics.script_magics = traitlets.Undefined
591
592
# Dict mapping short 'ruby' names to full paths, such as '/opt/secret/bin/ruby'
593
#
594
# Only necessary for items in script_magics where the default path will not find
595
# the right interpreter.
596
# c.ScriptMagics.script_paths = traitlets.Undefined
597
598
#------------------------------------------------------------------------------
599
# StoreMagics configuration
600
#------------------------------------------------------------------------------
601
602
# Lightweight persistence for python variables.
603
#
604
# Provides the %store magic.
605
606
# If True, any %store-d variables will be automatically restored when IPython
607
# starts.
608
# c.StoreMagics.autorestore = False
609