
    G@ddO                     r    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dS )	zIPython Console config page.    N)Qt)QGridLayout	QGroupBoxQHBoxLayoutQLabel
QTabWidgetQVBoxLayout)_)PluginConfigPagec                       e Zd Zd ZdS )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                      }	|	                    |           |	                    |           |	                    |           |	                    |           |	                    |           |	                    |           |                    |	           t          t          d                    }
t          t          d                    }|                    d           t          d          dft          d          dft          d          dfg}|                     t          d          dz   |d          }t                      }|                    |           |                    |           |
                    |           t          t          d                    }| 	                    t          d          t          d           d!d"d#d$t          d%          &          }t                      }|                    |           |                    |           t          t          d'                    } |t          d(          d)          } |t          d*          d+t          d,                    }|
                    |                     d)                     |j                            |j
                   t                      }|                    |           |                    |           |                    |           t          d-          }t          d.          }t          t          d/                    }t          t          d0          ||fz            }|                    d           |df|dfd1d2g}t          j        d3k    r|                    d4           t#          |          }|                     t          d5          dz   |d6dt          d7          8          }t                      }|                    |           |                    |           |                    |           |
                    |                     d)                     |j                            |j
                   t          t          d9                    }t          t          d:                    }|                    d           d;}|                     t          d<          dz   |d=d>          } | 	                    t          d?          d@z   dAt          dB          z   dCdDdEdFt          dG          &          }!| 	                    t          dH          d@z   dAt          dI          z   dJddKdt          dL          &          }"| 	                    t          dM          d@z   dAt          dI          z   dNddKdt          dO          &          }# |t          dP          dQt          dR                    }$t                      }%|%                    |           t%                      }&|&                    | j        dd           |&                    | j        dd           |&                    |!j        dd           |&                    |!j        dd           |&                    |!j        dd           |&                    |"j        dSd           |&                    |"j        dSd           |&                    |"j        dSd           |&                    |#j        dTd           |&                    |#j        dTd           |&                    |#j        dTd           |&                    |$dUdddT           t1                      }'|'                    |&           |'                    d           |%                    |'           |                    |%           |
                    |                     d)                     |j                            |j
                   t          t          dV                    }(t          t          dW                    })|)                    d           |                     t          dX          dYdZt8          j        [          }*t                      }+|+                    |)           |+                    |*           |(                    |+           t          t          d\                    },t          t          d]                    }-|-                    d            |t          d^          d_d`          }.|                     dZdadZ          }/|/
                    d`           |.j                            |/j
                   t                      }0|0                    |-           |0                    |.           |0                    |/           |,                    |0           t          t          db                    }1t          t          dc                    }2|2                    d           |                     t          dX          dddZt8          j        [          }3t                      }4|4                    |2           |4                    |3           |1                    |4           t          t          de                    }5t                      }6 |t          df          dgt          dh                    }7|6                    |7            |t          di          djt          dk                    }8|6                    |8            |t          dl          dmt          dn                    }9|6                    |9            |t          do          dpt          dq                    }:|6                    |:            |t          dr          dst          dt                    };|6                    |;           |5                    |6           t          t          du                    }<t          t          dv                    }=|=                    d            |t          dw          dxt          dy                    }>t                      }?|?                    |=           |?                    |>           |<                    |?           t          t          dz                    }@t          t          d{                    }A|A                    d            |t          d|          d}d~          }Bt                      }C|C                    |A           |C                    |B           |@                    |C           t          t          d                    }Dt          t          d                    }E|E                    d           t          d          }Ft          d          }Gt          d          df|Fdf|Gdff}H|                     t          d          |Hddt          d          |F|Gfz  8          }It                      }J|J                    |E           |J                    |I           |D                    |J           t          t          d                    }Kt          t          d                    }L|L                    d            |t          d          dt          d                    }Mt                      }N|N                    |L           |N                    |M           |K                    |N           t          t          d                    }Ot          t          d                    }P|P                    d           |                     t          d          ddZt          d          t8          j        [          }Q|                     t          d          ddZt          d          t8          j        [          }Rt                      }S|S                    |P           t%                      }T|T                    |Qj        dd           |T                    |Qj        dd           |T                    |Rj        dd           |T                    |Rj        dd           |S                    |T           |O                    |S           t          t          d                    }U |t          d          d          }Vt                      }W|W                    |V           |U                    |W           tA                      | _!        | j!        "                    | #                    ||
|          t          d                     | j!        "                    | #                    |||          t          d                     | j!        "                    | #                    |(|,          t          d                     | j!        "                    | #                    |5|1          t          d                     | j!        "                    | #                    |<|@|D|K|O|U          t          d                     t                      }X|X                    | j!                   |                     |X           d S )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                                                                                            Flib/python3.11/site-packages/spyder/plugins/ipythonconsole/confpage.py
setup_pagez#IPythonConsoleConfigPage.setup_page   s   $ $AkNN33U1566  "0  1  12 2 2
 uQ//AA%?@@,. .#e   . B C C	D D D a 3446IJJ%:;;$ 4 5 56 6 6 '=="":...""<000""7+++""#6777""=111""?333!!"2333q!23344
AEFFGG
t$$$~~q)AjMM1+='

AO
''-(8(8(>
(9; ;!mmj)))h'''[))) &a&6&677
 ))+(BT + , , * - - )]]$$[111##$6777  "E F FGGE!.//99	"U:;; & ' '( ( ( 	%%doog&>&>???!!"4"?@@@"}}y)))1222l+++ 8kNN	!!$6"7"788A 1 2 2
 6<Y4GH I I
 	t$$$QK)Q^L<8##OOL)))??**jMME!Q   	 +   %  ,,,  ---///  !9!9:::!!-":;;; !#3!4!455a !/ 0 0 1 1  &&&*))!I,,u*<g*F23 * 5 5
 ---((-s1U88|13 # $ $ . % %
 ((H++d*C(O.QRa// ) 1 1
 ))I,,t+S8_/abq// * 1 1  %344& 0 1 12 2 2 &--!!,///#
 0!Q777
 3Q::: 61=== 7A>>> 61===
 11a888
 2Aq999
 11a888 2Aq999 3Q::: 2Aq999Aq!<<<%--!!-000""1%%%!!/222/// 8 8999!!,"9::: $AjMM22  $B "C "C D D
 	##D)))--akk;N.0BM . K K '==""?333"">222!!"2333 #1\??33 #K !L !L M M 	""4(((U167715: :
11"6H"MM##E***""#3#>???%--!!.111!!*---!!"2333  111 (*D(E(EFF$Q5&6 &6 7 7 	''---!11hKK0" 2 O O  +}}&&':;;;&&'9:::%%&:;;;  '

++"}}#eABB! % & &' ' '
 	2333uIJJ! " # #$ $ $ 	|,,,788:J A B BC C C 	}---"U6779M / 0 01 1 1
 	1222$u<==& > ? ? @  @  @ 	3444l+++ q!23344
A D E E F F
 	t$$$5GHH)  H I IJ J J "mmj)))h'''[))) !#6!7!788a 
!1 
2 
2 
3 
3 	  &&&U1KLL- /0 0 0
 $---
+++}--- #1Z==11 #J !K !K L L
 	""4((('

yyE((A
T1I>++''
A ) * * .3DM	: , ; ; &--!!.111!!,///  111  "8 9 9::Q  0 1 1 2 2
 	%%%E!/00/ !: ; ;< < <	
 #}}{+++y)))l+++ "!I,,//q "9  :  : ; ;!!$'''--o " # # m . % % .." " # # m / % % %  ///&=="">#7A>>>"">#91a@@@""?#8!Q???""?#:AqAAA  !1222/// "!$9":":;; 5 4 5 5    %  !1222/// LL		*):< <=>y\\	K 	K 	K	6 678}}	F 	F 	F	^- -./	ll	< 	< 	<	,. ./0}}	> 	> 	>	n  122	4 	4 	4
 --$)$$$w    N)__name__
__module____qualname__r    r   r   r   r      s(        Y  Y  Y  Y  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      s    # " 


      5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 & % % % % % 3 3 3 3 3 3[  [  [  [  [ / [  [  [  [  [ r   