+
    i;                         R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt Rt	Rt
RtRR ltR tR tR tR
. R	R	3R ltR tR
RR
R
R
R	R	R	R
R
R
. 3R ltR
# )z+Tools for setting up interactive sessions. )GROUND_TYPES)version_tuple)init_printing)ARCHzfrom sympy import *
x, y, z, t = symbols('x y z t')
k, m, n = symbols('k m n', integer=True)
f, g, h = symbols('f g h', cls=Function)
init_printing()
zjThese commands were executed:
%(source)s
Documentation can be found at https://docs.sympy.org/%(version)s
zCould not locate IPython. Having IPython installed is greatly recommended.
See http://ipython.scipy.org for more details. If you use Debian/Ubuntu,
just install the 'ipython' package and start isympy again.
TFNc                   ^ RI Hp ^ RI Hp ^ RIp^ RIpV'       d   R# RVP
                  R,          ,          pV '       d   RpMRpR	\        ,          .p	VP                  R
4      p
V
e'   V
P                  4       R8X  d   V	P                  R4       V'       d   V	P                  R4       WV\        RP                  V	4      3pRV,          pVf   \        pRpVP                  R4      RR  F-  pV'       g   VR,          pK  VRV,           R,           ,          pK/  	  TpRV9   d   RpM	RV,          pVR\        RVRV/,          ,           ,          pV# )z,Create a banner for an interactive session. )__version__)SYMPY_DEBUGN z%d.%d.%d:N   NIPythonPythonzground types: %sSYMPY_USE_CACHEnoz
cache: offzdebugging: onz, z,%s console for SymPy %s (Python %s-%s) (%s)

z>>> devz%s/sourceversion)sympyr   r   sysosversion_infor   getenvlowerappendr   joinpreexec_sourcesplitverbose_message)ipythonquietr   sympy_versionr   r   r   python_version
shell_nameinfocacheargsmessage_sourcelinedoc_versions   &&&             W/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/interactive/session.py_make_messager,      s7   2!#"2"22"66N

-.DII'(EU[[]d2L!O$ndDIIdOKD=DG~GT"3B'tOGv}t++G	 (  Kk)to7)2K)A A A AG N    c                   ^ RI HpHpHpHpHp ^ RIHp R p. pV! V! V 4      P                  4      p	V	 FL  w  r  pW8X  d-   V! V4      '       d   VP                  VR3VR3W;3VR3.4       K:  VP                  W34       KN  	  V! V4      # )a+  
Wrap integer literals with Integer.

This is based on the decistmt example from
https://docs.python.org/3/library/tokenize.html.

Only integer literals are converted.  Float literals are left alone.

Examples
========

>>> from sympy import Integer # noqa: F401
>>> from sympy.interactive.session import int_to_Integer
>>> s = '1.2 + 1/2 - 0x12 + a1'
>>> int_to_Integer(s)
'1.2 +Integer (1 )/Integer (2 )-Integer (0x12 )+a1 '
>>> s = 'print (1/2)'
>>> int_to_Integer(s)
'print (Integer (1 )/Integer (2 ))'
>>> exec(s)
0.5
>>> exec(int_to_Integer(s))
1/2
)generate_tokens
untokenizeNUMBERNAMEOP)StringIOc                l    RV 9   g+   RV P                  4       9   g   RV P                  4       9   d   R# R# )zM
Returns true if string value num (with token NUMBER) represents an integer.
.jeFT)r   )nums   &r+   _is_intint_to_Integer.<locals>._is_intq   s+    
 #:		+sciik/Ar-   Integer())tokenizer/   r0   r1   r2   r3   ior4   readlineextendr   )sr/   r0   r1   r2   r3   r4   r:   resultgtoknumtokval_s   &            r+   int_to_IntegerrI   U   s    2 GF F,,-A#$1aMMy!S	 S		  MM6*+ $% fr-   c                D   aa ^ RI oV P                  oVV3R lpWn        R# )zE
Allow IPython to automatically convert integer literals to Integer.
Nc                 x   <  SP                  V 4       \        V 4      p S! V .VO5/ VB #   \         d     Li ; iN)parserI   SyntaxError)cellr&   kwargsastold_run_cells   &*,r+   my_run_cell7enable_automatic_int_sympification.<locals>.my_run_cell   sJ    
	( IIdO "$'DD242622	  		s   + 99)rQ   run_cell)shellrS   rQ   rR   s   & @@r+   "enable_automatic_int_sympificationrW      s     >>L3 !Nr-   c                p   a ^ RI pVP                  R4      oRV3R llpV P                  \        3V4       R# )z?Allow IPython to automatically create symbols (``isympy -a``). Nz8name '(?P<symbol>[A-Za-z_][A-Za-z0-9_]*)' is not definedc                  < V\         J d   VP                  '       d   VP                  P                  '       g   SP                  \        V4      4      pVe   V P	                  RRVP                  R4      /,          RR7        V P                  R,          R	,          pV P	                  VRR7        V P	                  RVP                  R4      ,          RR7       R# V P                  P                  WW4R7      pV P                  WV4       R#   \        \        3 d     Mi ; i T P	                  RTP                  R4      ,          RR7       Ls  T P	                  RTP                  R4      ,          RR7       i ; i)
zJHandle :exc:`NameError` exception and allow injection of missing symbols. Nz!%(symbol)s = Symbol('%(symbol)s')symbolF)store_historyInzdel %s)	tb_offsetr   )	NameErrortb_nextmatchstrrU   groupuser_nsKeyError
IndexErrorInteractiveTBstructured_traceback_showtraceback)	selfetypevaluetbr]   r`   codestbre_nameerrors	   &&&&&   r+   _handler*enable_automatic_symbols.<locals>._handler   sU   I"***RZZ5G5G5G &&s5z2E A'X)>?@OT  V	7<<-b1D MM$eM<MM(U[[-B"B05 " 7   55" 6 3E#. !*- 
 MM(U[[-B"B05 " 7DMM(U[[-B"B05 " 7s*   D E D"E !D""E +E;rL   )recompileset_custom_excr^   )rV   rr   rp   ro   s   &  @r+   enable_automatic_symbolsru      s4    N ::BDL/2 
)x0r-   c                   ^ RI p\        VP                  4      \        R4      8  d   V '       ge   \        VP                  4      \        R4      8  d   ^ RIHp M^ RIHp VP                  4       pRVn        VP                  V4       VP                  p V'       d   \        V 4       V'       d   \        V 4       V # ^ RIHp V! V4      # )zConstruct new IPython session. N0.11z1.0)ipappF)make_IPython)r   r   r   IPython.terminalrx   IPython.frontend.terminalTerminalIPythonAppdisplay_banner
initializerV   ru   rW   IPython.Shellry   )rV   argvauto_symbolsauto_int_to_Integerr   rx   appry   s   &&&&    r+   init_ipython_sessionr      s    W(()]6-BB
 W001]55II2;**,C "'CNN4 IIE$U+.u5.D!!r-   c                 :   a ^ RI Ho  ! V3R lRS4      p V ! 4       # )zConstruct new Python session. )InteractiveConsolec                   2   <a  ] tR tRt o RtV3R ltRtV tR# ))init_python_session.<locals>.SymPyConsolei  z.An interactive console with readline support. c                  < / pSP                  WR 7        ^ RIp^ RIp^ RIp^ RIpVP                  VP                  V4      P                  4       VP                  R4       \        VR4      '       dL   VP                  P                  R4      p VP                  V4       VP                  VP                  V4       R# R#   \         d     L-i ; i  \          d     R# i ; i))localsNztab: completeread_history_filez~/.sympy-history)__init__rlcompleterrA   r   atexitset_completer	Completercompleteparse_and_bindhasattrpath
expanduserr   OSErrorregisterwrite_history_fileImportError)ri   	ns_localsr   rA   r   r   historyr   s   &      r+   r   2init_python_session.<locals>.SymPyConsole.__init__  s    I'''?J" &&{'<'<Y'G'P'PQ''88%899 gg001CDG 227; OOH$?$?I :
 #   s#   C C CCC! C! N)__name__
__module____qualname____firstlineno____doc__r   __static_attributes____classdictcell__)__classdict__r   s   @r+   SymPyConsoler     s     <	J 	Jr-   r   )rm   r   )r   r   s    @r+   init_python_sessionr   	  s    'J) J8 >r-   c                   a ^ RI pRpV RJd%    ^ RIp ^ RIHp V! 4       o\        S4      pT f   Tp V RJ d   \        4       oSP                  pMe\        SWVR7      o\        XP                  4      \        R4      8  d!   RV3R	 llSn         SP                  RR
7       V'       g   SP                  pV'       d7   V '       d$   \        XP                  4      \        R4      8  d   \	        R4      hV'       d7   V '       d$   \        XP                  4      \        R4      8  d   \	        R4      h\        pSP                  VRR7       \!        WW4SWV
R7       \#        WV4      pV'       g&   \%        V4       X! 4        VP'                  R4       R# \%        V4       ^ RIpVP+                  R 4       R#   \         d    Ro ELi ; i  \         d    T RJ d   \	        R4      hRo ELi ; i  \         d     EL\i ; i)uH  
Initialize an embedded IPython or Python session. The IPython session is
initiated with the --pylab option, without the numpy imports, so that
matplotlib plotting can be interactive.

Parameters
==========

pretty_print: boolean
    If True, use pretty_print to stringify;
    if False, use sstrrepr to stringify.
order: string or None
    There are a few different settings for this parameter:
    lex (default), which is lexographic order;
    grlex, which is graded lexographic order;
    grevlex, which is reversed graded lexographic order;
    old, which is used for compatibility reasons and for long expressions;
    None, which sets it to lex.
use_unicode: boolean or None
    If True, use unicode characters;
    if False, do not use unicode characters.
use_latex: boolean or None
    If True, use latex rendering if IPython GUI's;
    if False, do not use latex rendering.
quiet: boolean
    If True, init_session will not print messages regarding its status;
    if False, init_session will print messages regarding its status.
auto_symbols: boolean
    If True, IPython will automatically create symbols for you.
    If False, it will not.
    The default is False.
auto_int_to_Integer: boolean
    If True, IPython will automatically wrap int literals with Integer, so
    that things like 1/2 give Rational(1, 2).
    If False, it will not.
    The default is False.
ipython: boolean or None
    If True, printing will initialize for an IPython console;
    if False, printing will initialize for a normal console;
    The default is None, which automatically determines whether we are in
    an ipython instance or not.
str_printer: function, optional, default=None
    A custom string printer function. This should mimic
    sympy.printing.sstrrepr().
pretty_printer: function, optional, default=None
    A custom pretty printer. This should mimic sympy.printing.pretty().
latex_printer: function, optional, default=None
    A custom LaTeX printer. This should mimic sympy.printing.latex()
    This should mimic sympy.printing.latex().
argv: list of arguments for IPython
    See sympy.bin.isympy for options that can be used to initialize IPython.

See Also
========

sympy.interactive.printing.init_printing: for examples and the rest of the parameters.


Examples
========

>>> from sympy import init_session, Symbol, sin, sqrt
>>> sin(x) #doctest: +SKIP
NameError: name 'x' is not defined
>>> init_session() #doctest: +SKIP
>>> sin(x) #doctest: +SKIP
sin(x)
>>> sqrt(5) #doctest: +SKIP
  ___
\/ 5
>>> init_session(pretty_print=False) #doctest: +SKIP
>>> sqrt(5) #doctest: +SKIP
sqrt(5)
>>> y + x + y**2 + x**2 #doctest: +SKIP
x**2 + x + y**2 + y
>>> init_session(order='grlex') #doctest: +SKIP
>>> y + x + y**2 + x**2 #doctest: +SKIP
x**2 + y**2 + x + y
>>> init_session(order='grevlex') #doctest: +SKIP
>>> y * x**2 + x * y**2 #doctest: +SKIP
x**2*y + x*y**2
>>> init_session(order='old') #doctest: +SKIP
>>> x**2 + y**2 + x + y #doctest: +SKIP
x + y + x**2 + y**2
>>> theta = Symbol('theta') #doctest: +SKIP
>>> theta #doctest: +SKIP
theta
>>> init_session(use_unicode=True) #doctest: +SKIP
>>> theta # doctest: +SKIP
θ
NF)get_ipythonTz'IPython is not available on this system)r   r   r   rw   execc                 (   < SP                  V R 4      # )F)rU   )srcrZ   ips   &&r+   <lambda>init_session.<locals>.<lambda>  s    bkk#u6Mr-   )
import_allzKautomatic construction of symbols is possible only in IPython 0.11 or abovezQautomatic int to Integer transformation is possible only in IPython 0.11 or above)rZ   )pretty_printorderuse_unicode	use_latexr   str_printerpretty_printerlatex_printerzExiting ...c                      \        R 4      # )zExiting ...
)printr   r-   r+   r   r     s	    o 6r-   )r   )r   r   r   r   RuntimeErrorboolr   interactr   r   r   	runsourceenable_pylab	Exceptionmainloopr   r   r,   r   exitr   r   )r   r   r   r   r   r    r   r   r   r   r   r   r   
in_ipythonr   r   r   _preexec_sourcer'   r   r   s   &&&&&&&&&&&&        @r+   init_sessionr   ,  s   ~ Je	/ ] "X
? G% ";;!"46IK ,,-v1FF NBL51 {{HWg6I6I(J][aMb(bhiiG}W=P=P/QTabhTi/inoo$OLLL0|)2) -/
 GO<Gg
g67k    	$"#LMMB	<  
 s4   G	 F5 G. 5GG	G+*G+.G=<G=)TFN)r   sympy.external.gmpyr   sympy.external.importtoolsr   sympy.interactive.printingr   sympy.utilities.miscr   r   r   
no_ipythonr,   rI   rW   ru   r   r   r   r   r-   r+   <module>r      s}    1 , 4 4 %
3l1h!0D1N  $"5V[ "B F D!TU%*T#"c8r-   