
    JedO                     j    d Z ddlZddlmZ ddlmZmZmZmZm	Z	m
Z
 ddlmZ ddlmZ  G d de      Zy)	zIPython Console config page.    N)Qt)QGridLayout	QGroupBoxQHBoxLayoutQLabel
QTabWidgetQVBoxLayout)_)PluginConfigPagec                       e Zd Zd Zy)IPythonConsoleConfigPagec                     | j                   }t        t        d            } |t        d      dt        d            } |t        d      d      } |t        d      d	      } |t        d
      dt        d            } |t        d      d      } |t        d      dt        d            }t               }	|	j	                  |       |	j	                  |       |	j	                  |       |	j	                  |       |	j	                  |       |	j	                  |       |j                  |	       t        t        d            }
t        t        d            }|j                  d       t        d      dft        d      dft        d      dfg}| j                  t        d      dz   |d      }t               }|j	                  |       |j	                  |       |
j                  |       t        t        d            }| j                  t        d      t        d       d!d"d#d$t        d%      &      }t               }|j	                  |       |j                  |       t        t        d'            } |t        d(      d)      } |t        d*      d+t        d,            }|j                  | j                  d)             |j                  j                  |j                         t               }|j	                  |       |j	                  |       |j                  |       t        d-      }t        d.      }t        t        d/            }t        t        d0      ||fz        }|j                  d       |df|dfd1d2g}t        j                  d3k(  r|j!                  d4       t#        |      }| j                  t        d5      dz   |d6dt        d7      8      }t               }|j	                  |       |j	                  |       |j                  |       |j                  | j                  d)             |j                  j                  |j                         t        t        d9            }t        t        d:            }|j                  d       d;}| j                  t        d<      dz   |d=d>      } | j                  t        d?      d@z   dAt        dB      z   dCdDdEdFt        dG      &      }!| j                  t        dH      d@z   dAt        dI      z   dJddKdt        dL      &      }"| j                  t        dM      d@z   dAt        dI      z   dNddKdt        dO      &      }# |t        dP      dQt        dR            }$t               }%|%j	                  |       t%               }&|&j	                  | j&                  dd       |&j	                  | j(                  dd       |&j	                  |!j*                  dd       |&j	                  |!j,                  dd       |&j	                  |!j.                  dd       |&j	                  |"j*                  dSd       |&j	                  |"j,                  dSd       |&j	                  |"j.                  dSd       |&j	                  |#j*                  dTd       |&j	                  |#j,                  dTd       |&j	                  |#j.                  dTd       |&j	                  |$dUdddT       t1               }'|'j3                  |&       |'j5                  d       |%j3                  |'       |j                  |%       |j                  | j                  d)             |j                  j                  |j                         t        t        dV            }(t        t        dW            })|)j                  d       | j7                  t        dX      dYdZt8        j:                  [      }*t               }+|+j	                  |)       |+j	                  |*       |(j                  |+       t        t        d\            },t        t        d]            }-|-j                  d        |t        d^      d_d`      }.| j=                  dZdadZ      }/|/j                  d`       |.j                  j                  |/j                         t               }0|0j	                  |-       |0j	                  |.       |0j	                  |/       |,j                  |0       t        t        db            }1t        t        dc            }2|2j                  d       | j7                  t        dX      dddZt8        j:                  [      }3t               }4|4j	                  |2       |4j	                  |3       |1j                  |4       t        t        de            }5t               }6 |t        df      dgt        dh            }7|6j	                  |7        |t        di      djt        dk            }8|6j	                  |8        |t        dl      dmt        dn            }9|6j	                  |9        |t        do      dpt        dq            }:|6j	                  |:        |t        dr      dst        dt            };|6j	                  |;       |5j                  |6       t        t        du            }<t        t        dv            }=|=j                  d        |t        dw      dxt        dy            }>t               }?|?j	                  |=       |?j	                  |>       |<j                  |?       t        t        dz            }@t        t        d{            }A|Aj                  d        |t        d|      d}d~      }Bt               }C|Cj	                  |A       |Cj	                  |B       |@j                  |C       t        t        d            }Dt        t        d            }E|Ej                  d       t        d      }Ft        d      }Gt        d      df|Fdf|Gdff}H| j                  t        d      |Hddt        d      |F|Gfz  8      }It               }J|Jj	                  |E       |Jj	                  |I       |Dj                  |J       t        t        d            }Kt        t        d            }L|Lj                  d        |t        d      dt        d            }Mt               }N|Nj	                  |L       |Nj	                  |M       |Kj                  |N       t        t        d            }Ot        t        d            }P|Pj                  d       | j7                  t        d      ddZt        d      t8        j:                  [      }Q| j7                  t        d      ddZt        d      t8        j:                  [      }Rt               }S|Sj	                  |P       t%               }T|Tj	                  |Qj&                  dd       |Tj	                  |Qj>                  dd       |Tj	                  |Rj&                  dd       |Tj	                  |Rj>                  dd       |Sj3                  |T       |Oj                  |S       t        t        d            }U |t        d      d      }Vt               }W|Wj	                  |V       |Uj                  |W       tA               | _!        | jB                  jE                  | jG                  ||
|      t        d             | jB                  jE                  | jG                  |||      t        d             | jB                  jE                  | jG                  |(|,      t        d             | jB                  jE                  | jG                  |5|1      t        d             | jB                  jE                  | jG                  |<|@|D|K|O|U      t        d             t               }X|Xj	                  | jB                         | j                  |X       y )N	InterfacezDisplay initial bannershow_bannerzWThis option lets you hide the message shown at
the top of the console when it's opened.)tipzShow calltipsshow_calltipsz#Ask for confirmation before closingask_before_closingz?Ask for confirmation before removing all user-defined variablesshow_reset_namespace_warningz]This option lets you hide the warning message shown
when resetting the namespace from Spyder.zShow elapsed timeshow_elapsed_timez&Ask for confirmation before restartingask_before_restartzOThis option lets you hide the warning message shown
when restarting the kernel.zCompletion typez%Decide what type of completion to useT	Graphicalr   Terminal   Plain   zCompletion:z   completion_typezSource codez	Buffer:  z linesbuffer_sizei  d   z|Set the maximum number of lines of text shown in the
console before truncation. Specifying -1 disables it
(not recommended!))min_max_stepr   z!Support for graphics (Matplotlib)zActivate supportpylabz*Automatically load Pylab and NumPy moduleszpylab/autoloadzThis lets you load graphics support without importing
the commands to do plots. Useful to work with other
plotting libraries different to Matplotlib or to develop
GUIs with Spyder.Inline	AutomaticzGraphics backendzDecide how graphics are going to be displayed in the console. If unsure, please select <b>%s</b> to put graphics inside the console or <b>%s</b> to interact with them (through zooming and panning) in a separate window.)Qt5r   )Tkinter   darwin)macOS   zBackend:zpylab/backendz>This option will be applied the next time a console is opened.)defaultr   zInline backendz8Decide how to render the figures created by this backend))PNGr   )SVGr   zFormat:zpylab/inline/figure_format)r,   zResolution:z   dpizpylab/inline/resolution2   i  g?z/Only used when the format is PNG. Default is 72zWidth:incheszpylab/inline/width   zDefault is 6zHeight:zpylab/inline/heightzDefault is 4z#Use a tight layout for inline plotszpylab/inline/bbox_incheszSets bbox_inches to "tight" when
plotting inline with matplotlib.
When enabled, can cause discrepancies
between the image displayed inline and
that created using savefig.r(   r+      zRun codezYou can run several lines of code when a console is started. Please introduce each one separated by semicolons and a space, for example:<br><i>import os; import sys</i>zLines:zstartup/run_lines )	alignmentz
Run a filezsYou can also run a whole file at startup instead of just some lines (This is similar to have a PYTHONSTARTUP file).zUse the following file:zstartup/use_run_fileFzstartup/run_filezRun code while debuggingzYou can run several lines of code on each new prompt while debugging. Please introduce each one separated by semicolons and a space, for example:<br><i>import matplotlib.pyplot as plt</i>zstartup/pdb_run_linesDebugz1Prevent editor from closing files while debuggingpdb_prevent_closingzGThis option prevents the user from closing a file while it is debugged.z9Stop debugging on first line of files without breakpointspdb_stop_first_linezxThis option lets you decide if the debugger should stop on the first line while debugging if no breakpoints are present.z'Ignore Python libraries while debuggingpdb_ignore_libz_This option lets you decide if the debugger should ignore the system libraries while debugging.z&Process execute events while debuggingpdb_execute_eventszThis option lets you decide if the debugger should process the 'execute events' after each prompt, such as matplotlib 'show' command.z,Use exclamation mark prefix for Pdb commandspdb_use_exclamation_markzThis option lets you decide if the Pdb commands should be prefixed by an exclamation mark. This helps in separating Pdb commands from Python code.zJedi completionzEnable Jedi-based <tt>Tab</tt> completion in the IPython console; similar to the greedy completer, but without evaluating the code.<br><b>Warning:</b> Slows down your console when working with large dataframes!z*Use Jedi completion in the IPython consolejedi_completerzu<b>Warning</b>: Slows down your console when working with large dataframes!<br>Allows completion of nested lists etc.zGreedy completiona  Enable <tt>Tab</tt> completion on elements of lists, results of function calls, etc, <i>without</i> assigning them to a variable, like <tt>li[0].&lt;Tab&gt;</tt> or <tt>ins.meth().&lt;Tab&gt;</tt> <br><b>Warning:</b> Due to a bug, IPython's greedy completer requires a leading <tt>&lt;Space&gt;</tt> for some completions; e.g.  <tt>np.sin(&lt;Space&gt;np.&lt;Tab&gt;</tt> works while <tt>np.sin(np.&lt;Tab&gt; </tt> doesn't.z,Use greedy completion in the IPython consolegreedy_completerzd<b>Warning</b>: It can be unsafe because the code is actually evaluated when you press <tt>Tab</tt>.AutocallzAutocall makes IPython automatically call any callable object even if you didn't type explicit parentheses.<br>For example, if you type <i>str 43</i> it becomes <i>str(43)</i> automatically.SmartFullOffzAutocall:  autocallzOn <b>%s</b> mode, Autocall is not applied if there are no arguments after the callable. On <b>%s</b> mode, all callable objects are automatically called (even if no arguments are present).zSymbolic mathematicszPerfom symbolic operations in the console (e.g. integrals, derivatives, vector calculus, etc) and get the outputs in a beautifully printed style (it requires the Sympy module).zUse symbolic mathsymbolic_mathznThis option loads the Sympy library to work with.<br>Please refer to its documentation to learn how to use it.Promptsz=Modify how Input and Output prompts are shown in the console.zInput prompt:	in_promptzHDefault is<br>In [&lt;span class="in-prompt-number"&gt;%i&lt;/span&gt;]:zOutput prompt:
out_promptzIDefault is<br>Out[&lt;span class="out-prompt-number"&gt;%i&lt;/span&gt;]:zWindows adjustmentszDHide command line output windows generated by the subprocess module.hide_cmd_windowsDisplayGraphicsStartupDebuggerzAdvanced settings)$create_checkboxr   r
   r	   	addWidget	setLayoutr   setWordWrapcreate_comboboxcreate_spinbox
setEnabled
get_optiontoggledconnectsysplatformappendtupler   labelcomboboxplabelspinboxslabelr   	addLayout
addStretchcreate_lineeditr   
Horizontalcreate_browsefiletextboxr   tabsaddTab
create_tab)Yselfnewcbinterface_group
banner_boxcalltips_boxask_boxreset_namespace_boxshow_time_boxask_restart_boxinterface_layout
comp_group
comp_label
completerscomp_boxcomp_layoutsource_code_groupbuffer_spinsource_code_layoutpylab_group	pylab_boxautoload_pylab_boxpylab_layoutinline	automaticbackend_group
bend_labelbackendsbackend_boxbackend_layoutinline_groupinline_labelformats
format_boxresolution_spin
width_spinheight_spinbbox_inches_boxinline_v_layoutinline_layoutinline_h_layoutrun_lines_grouprun_lines_labelrun_lines_editrun_lines_layoutrun_file_grouprun_file_label
file_radiorun_file_browserrun_file_layoutpdb_run_lines_grouppdb_run_lines_labelpdb_run_lines_editpdb_run_lines_layoutdebug_groupdebug_layoutprevent_closing_boxcontinue_boxlibraries_boxexecute_events_boxexclamation_mark_box
jedi_group
jedi_labeljedi_boxjedi_layoutgreedy_groupgreedy_label
greedy_boxgreedy_layoutautocall_groupautocall_labelsmartfullautocall_optsautocall_boxautocall_layoutsympy_groupsympy_label	sympy_boxsympy_layoutprompts_groupprompts_labelin_prompt_editout_prompt_editprompts_layoutprompts_g_layoutwindows_grouprH   windows_layoutvlayoutsY                                                                                            H/usr/lib/python3/dist-packages/spyder/plugins/ipythonconsole/confpage.py
setup_pagez#IPythonConsoleConfigPage.setup_page   sq   $$ $AkN3156  "0  12
 Q/A?@,.#  . B C	D a 346IJ:;$ 4 56 '="":.""<0""7+""#67""=1""?3!!"23q!234
AEFG
t$~q)AjM1+='
AO
''-(8(>
(9;!mj)h'[) &a&67
 ))+(BT + , * - )]$$[1##$67  "E FG!./9	":; & '( 	%%doog&>?!!"4"?"?@"}y)12l+ 8kN	!!$6"78A 1 2
 6<Y4GH I
 	t$QK)Q^L<<8#OOL)?**jME!Q  	 +  %  ,  -/  !9:!!-":":; !#3!45a !/ 0 1  &*))!I,u*<g*F23 * 5
 ---(-s1U8|13 # $ . %
 ((H+d*C(O.QRa/ ) 1
 ))I,t+S8_/abq/ * 1  34& 0 12 &-!!,/#
 0 0!Q7
 3 3Q: 6 61= 7 7A> 6 61=
 1 11a8
 2 2Aq9
 1 11a8 2 2Aq9 3 3Q: 2 2Aq9Aq!<%-!!-0""1%!!/2/ 89!!,"9"9: $AjM2  $B "C D
 	##D)--ak;N.0BMM . K '=""?3"">2!!"23 #1\?3 #K !L M 	""4(16715:
11"6H"M##E*""#3#>#>?%-!!.1!!*-!!"23  1 (*D(EF$Q5&6 7 	''-!11hK0" 2 O  +}&&':;&&'9:%%&:;  '
+"}#AB! % &'
 	23IJ! " #$ 	|,78:J A BC 	}-"679M / 01
 	12$<=& > ? @ 	34l+ q!234
A D E F
 	t$GH)  H IJ "mj)h'[) !#6!78a 
!1 
2 
3 	  &1KL- /0
 $-
+}- #1Z=1 #J !K L
 	""4('
yE(A
T1I>++'
A ) * .3DM	: , ; &-!!.1!!,/  1  "8 9:Q  0 1 2
 	%!/0/ !: ;<	
 #}{+y)l+ "!I,/q "9  : ;!!$'--o " # mm . % .." " # mm / % %  /&="">#7#7A>"">#9#91a@""?#8#8!Q?""?#:#:AqA  !12/ "!$9":;  4 5  %  !12/ L			*):<=>y\	K		678}	F		^-./	l	<		,./0}	>		n 12	4
 -$))$w    N)__name__
__module____qualname__r    r   r   r   r      s    Y r   r   )__doc__rW   qtpy.QtCorer   qtpy.QtWidgetsr   r   r   r   r   r	   spyder.api.translationsr
   spyder.api.preferencesr   r   r   r   r   <module>r      s5    #  5 5 & 3[ / [ r   