ó
    ‰*£há;  ã                   óš   • S r SSKJr  SSKJr  SSKJr  SSKJr  Sr	Sr
SrSS jrS rS rS rS/ S
S
4S jrS rSS	SSSS
S
S
SSS/ 4S jrg)z+Tools for setting up interactive sessions. é    )ÚGROUND_TYPES)Úversion_tuple)Úinit_printing)ÚARCHz–from 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
zÏCould 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                 ó.  • SSK Jn  SSK Jn  SSKnSSKnU(       a  gSUR
                  SS -  nU (       a  SnOS	nS
[        -  /n	UR                  S5      n
U
b%  U
R                  5       S:X  a  U	R                  S5        U(       a  U	R                  S5        XƒU[        SR                  U	5      4nSU-  nUc  [        nSnUR                  S5      SS  H  nU(       d  US-  nM  USU-   S-   -  nM     UnSU;   a  SnOSU-  nUS[        UUS.-  -   -  nU$ )z,Create a banner for an interactive session. r   )Ú__version__)ÚSYMPY_DEBUGNÚ z%d.%d.%dé   Ú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                   ÚV/home/mande/repo/quber/.venv/lib/python3.13/site-packages/sympy/interactive/session.pyÚ_make_messager-      s5  € å2Ý!ãÛæØà #×"2Ñ"2°2°AÐ"6Ñ6€NæØ‰
àˆ
à¤Ñ-Ð.€Dà�I‰IÐ'Ó(€EàÑ˜UŸ[™[›]¨dÓ2Ø�‰�LÔ!æØ�‰�OÔ$à n´d¸D¿I¹IÀd»OÐK€DØ=ÀÑD€Gà�~Üˆà€Gà—‘˜TÓ" 3 BÓ'ˆÞØ�t‰OŠGà�v ‘} tÑ+Ñ+ŠGñ	 (ð  €KØ�ÓØ‰à˜kÑ)ˆàˆt”o°7Ø4?ñ)Añ Añ Añ A€Gð €Nó    c                 ó  • SSK JnJnJnJnJn  SSKJn  S n/ nU" U" U 5      R                  5      n	U	 HJ  u  p«    nX£:X  a+  U" U5      (       a  UR                  US4US4X;4US4/5        M8  UR                  X«45        ML     U" U5      $ )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
r   )Úgenerate_tokensÚ
untokenizeÚNUMBERÚNAMEÚOP)ÚStringIOc                 ób   • SU ;   d(  SU R                  5       ;   d  SU R                  5       ;   a  gg)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+   € ð
 �#‹:˜ §	¡	£Ó+¨s°c·i±i³kÓ/AØØr.   ÚIntegerÚ(Ú))Útokenizer0   r1   r2   r3   r4   Úior5   ÚreadlineÚextendr   )Úsr0   r1   r2   r3   r4   r5   r;   ÚresultÚgÚtoknumÚtokvalÚ_s                r,   Úint_to_IntegerrJ   U   sš   € ÷2 GÕFÝòð €FÙ™ ›×,Ñ,Ó-€AÛ#$Ñˆ˜˜1˜aØÓ¡¨§¡Ø�M‰MØ�yÐ!Ø�S�	ØÐ Ø�S�	ð	ö ð �M‰M˜6Ð*Ö+ñ $%ñ �fÓÐr.   c                 óB   ^^• SSK mU R                  mUU4S jnXl        g)zE
Allow IPython to automatically convert integer literals to Integer.
r   Nc                 óv   >•  TR                  U 5        [        U 5      n T" U /UQ70 UD6$ ! [         a     Nf = f©N)ÚparserJ   ÚSyntaxError)Úcellr'   ÚkwargsÚastÚold_run_cells      €€r,   Úmy_run_cellÚ7enable_automatic_int_sympification.<locals>.my_run_cell�   sJ   ø€ ð
	(ð �I‰I�dŒOô " $Ó'ˆDÙ˜DÐ2 4Ò2¨6Ñ2Ð2øô	 ó 	Ùð	ús   ƒ+ «
8·8)rR   Úrun_cell)ÚshellrT   rR   rS   s     @@r,   Ú"enable_automatic_int_sympificationrX   ‰   s   ù€ ó Ø—>‘>€Lö3ð !…Nr.   c                 ón   ^• SSK nUR                  S5      mSU4S jjnU R                  [        4U5        g)z?Allow IPython to automatically create symbols (``isympy -a``). r   Nz8name '(?P<symbol>[A-Za-z_][A-Za-z0-9_]*)' is not definedc                 óš  >• U[         L a´  UR                  (       a£  UR                  R                  (       dˆ  TR                  [        U5      5      nUbk  U R	                  SSUR                  S5      0-  SS9   U R                  S   S   nU R	                  USS9   U R	                  SUR                  S5      -  SS9  gU R                  R                  XX4S	9nU R                  XU5        g! [        [        4 a     Of = f U R	                  SUR                  S5      -  SS9  Ng! U R	                  SUR                  S5      -  SS9  f = f)
zJHandle :exc:`NameError` exception and allow injection of missing symbols. Nz!%(symbol)s = Symbol('%(symbol)s')ÚsymbolF)Ústore_historyÚInr   zdel %s)Ú	tb_offset)Ú	NameErrorÚtb_nextÚmatchÚstrrV   ÚgroupÚuser_nsÚKeyErrorÚ
IndexErrorÚInteractiveTBÚstructured_tracebackÚ_showtraceback)	ÚselfÚetypeÚvalueÚtbr^   ra   ÚcodeÚstbÚre_nameerrors	           €r,   Ú_handlerÚ*enable_automatic_symbols.<locals>._handlerÌ   sP  ø€ à”IÒ "§*§*°R·Z±Z×5G×5GØ ×&Ñ&¤s¨5£zÓ2ˆEàÑ à—‘ÐAØ'¨¯©°XÓ)>Ð?ñ@ØOTð ñ Vð	7ØŸ<™<¨Ñ-¨bÑ1�Dð —M‘M $°e�MÑ<Øà—M‘M (¨U¯[©[¸Ó-BÑ"BØ05ð "ò 7ð × Ñ ×5Ñ5Ø˜"ð 6ð 3ˆà×Ñ˜E¨#Õ.øô !¤*Ð-ó ÙðúØð
 —M‘M (¨U¯[©[¸Ó-BÑ"BØ05ð "ò 7ø�D—M‘M (¨U¯[©[¸Ó-BÑ"BØ05ð "ò 7ús*   Á9C, ÂD& Ã,C?Ã<D& Ã>C?Ã?D& Ä&$E
rM   )ÚreÚcompileÚset_custom_excr_   )rW   rs   rq   rp   s      @r,   Úenable_automatic_symbolsrv   ¡   s4   ø€ óN Ø—:‘:ØBóD€L÷/ð2 
×Ñœ)˜ xÕ0r.   c                 óŠ  • SSK n[        UR                  5      [        S5      :¼  a�  U (       dc  [        UR                  5      [        S5      :¼  a  SSKJn  OSSKJn  UR                  5       nSUl        UR                  U5        UR                  n U(       a  [        U 5        U(       a  [        U 5        U $ SSKJn  U" U5      $ )zConstruct new IPython session. r   Nú0.11z1.0)ÚipappF)Úmake_IPython)r   r   r   ÚIPython.terminalry   ÚIPython.frontend.terminalÚTerminalIPythonAppÚdisplay_bannerÚ
initializerW   rv   rX   ÚIPython.Shellrz   )rW   ÚargvÚauto_symbolsÚauto_int_to_Integerr   ry   Úapprz   s           r,   Úinit_ipython_sessionr…   è   s–   € ãä�W×(Ñ(Ó)¬]¸6Ó-BÓBÞô
 ˜W×0Ñ0Ó1´]À5Ó5IÓIÞ2å;Ø×*Ñ*Ó,ˆCð "'ˆCÔØ�N‰N˜4Ô à—I‘IˆEæÜ$ UÔ+ÞÜ.¨uÔ5àˆå.Ù˜DÓ!Ð!r.   c                  ó:   ^• SSK Jm   " U4S jST5      n U " 5       $ )zConstruct new Python session. r   ©ÚInteractiveConsolec                   ó&   >• \ rS rSrSrU 4S jrSrg)Ú)init_python_session.<locals>.SymPyConsolei  z.An interactive console with readline support. c                 ó¶  >• 0 nTR                  XS9   SS KnSS KnSS KnSS KnUR                  UR                  U5      R                  5        UR                  S5        [        US5      (       aJ  UR                  R                  S5      n UR                  U5        UR                  UR                  U5        g g ! [         a     N*f = f! [          a     g f = f)N)Úlocalsr   ztab: completeÚread_history_filez~/.sympy-history)Ú__init__ÚrlcompleterrB   r   ÚatexitÚset_completerÚ	CompleterÚcompleteÚparse_and_bindÚhasattrÚpathÚ
expanduserr�   ÚOSErrorÚregisterÚwrite_history_fileÚImportError)rj   Ú	ns_localsr�   rB   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Ø Ÿg™g×0Ñ0Ð1CÓD�GðØ ×2Ñ2°7Ô;ð —O‘O H×$?Ñ$?ÀÕIð :øô
 #ó Ùðûô ó Ùðús#   ”C ÂB; Â;
CÃCÃ
CÃC© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rŽ   Ú__static_attributes__r‡   s   €r,   ÚSymPyConsolerŠ     s   ø† Ù<÷	Jð 	Jr.   r¦   )rn   rˆ   )r¦   rˆ   s    @r,   Úinit_python_sessionr§   	  s   ø€ å'÷JÐ)ô Jñ8 ‹>Ðr.   c                 óÄ  ^• SSK nSnU SLa#   SSKn SSKJn  U" 5       m[        T5      nU c  Un U SL a  [        5       mTR                  nO][        TX¶US9m[        WR                  5      [        S5      :¼  a  SU4S
 jjTl         TR                  SS9  U(       d  TR                  nU(       a4  U (       a"  [        WR                  5      [        S5      :  a  [	        S5      eU(       a4  U (       a"  [        WR                  5      [        S5      :  a  [	        S5      e[        nTR                  US	S9  [!        XX4TX‰U
S9  [#        XU5      nU(       d$  [%        U5        W" 5         UR'                  S5        g[%        U5        SSKnUR+                  S 5        g! [         a    Sm GNŠf = f! [         a    U SL a  [	        S5      eSm GN­f = f! [         a     GNHf = f)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
Î¸
r   NF)Úget_ipythonTz'IPython is not available on this system)r�   r‚   rƒ   rx   Úexecc                 ó(   >• TR                  U S5      $ )NF)rV   )Úsrcr[   Úips     €r,   Ú<lambda>Úinit_session.<locals>.<lambda>«  s   ø€ °b·k±kÀ#ÀuÔ6Mr.   )Ú
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)r[   )Úpretty_printÚorderÚuse_unicodeÚ	use_latexr­   Ústr_printerÚpretty_printerÚlatex_printerzExiting ...c                  ó   • [        S5      $ )Nz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à�%ÒÜ Ó"ˆØ—;‘;‰ä! "¨4Ø6IñKˆô ˜×,Ñ,Ó-´¸vÓ1FÓFö NˆBŒLðØ—‘¨5�Ñ1ö Ø—{‘{ˆHæžW¬°g×6IÑ6IÓ(JÌ]Ð[aÓMbÓ(bÜÐhÓiÐiÞ¦G¬}¸W×=PÑ=PÓ/QÔTaÐbhÓTiÓ/iÜÐnÓoÐoä$€Oà‡L�L�¨€LÑ0Ü˜|Ø)À2Ø)Ø -ò/ô
 ˜G¨OÓ<€GæÜˆgŒÙŒ
Ø�‰�ÕäˆgŒÛØ�‰Ñ6Õ7øôk ó Ø“ðûô ó 	Ø˜$ŠÜ"Ð#LÓMÐMØ‹Bð	ûô< ó ò
 ðús4   ŽF. “F ÂG ÆF+Æ*F+Æ.GÇGÇ
GÇG)TFN)r¤   Úsympy.external.gmpyr   Úsympy.external.importtoolsr   Úsympy.interactive.printingr   Úsympy.utilities.miscr   r   r   Ú
no_ipythonr-   rJ   rX   rv   r…   r§   rÄ   rŸ   r.   r,   Ú<module>rÊ      s}   ðÙ 1å ,Ý 4å 4å %ð€ð€ð€
ô3òl1òh!ò0D1ðN  $¨"¸5ÐV[ô "òB ðF ¨D¸Ø!¨T¸ÈUØ%*¸ÈTØ#¨"õc8r.   