Ë
    óÿæi:T  ã                   ó|   — d Z ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ d„ Zd	„ Zd
„ ZdZ	 	 	 	 	 	 	 dd„Zy)z7Tools for setting up printing in interactive sessions. é    )ÚBytesIO)Úlatex)Úpreview)Údebug)Ú	Printable)Úimport_modulec                 ó6   ‡ ‡‡— ddl }ddlŠˆˆˆ fd„}||_        y)z.Setup printing in Python interactive session. r   Nc                 óL   •— | �!d‰_         t         ‰| fi ‰¤Ž«       | ‰_         yy)z’Python's pretty-printer display hook.

           This function was adapted from:

            https://www.python.org/dev/peps/pep-0217/

        N)Ú_Úprint)ÚargÚbuiltinsÚsettingsÚstringify_funcs    €€€úo/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/sympy/interactive/printing.pyÚ_displayhookz+_init_python_printing.<locals>._displayhook   s/   ø€ ð ˆ?ØˆHŒJÜ‘. Ñ1¨Ñ1Ô2ØˆH�Jð ó    )Úsysr   Údisplayhook)r   r   r   r   r   s   ``  @r   Ú_init_python_printingr      s   ú€ ãÛöð #€C…Or   c                 óT  ‡‡‡‡‡‡‡
‡‡‡‡‡ ‡!‡"‡#‡$‡%‡&‡'— t        dd¬«      Š	 ddlmŠ& ‰€8| j                  j                  «       }|dk(  rdŠn
|d	k(  rd
ŠndŠt        d‰«       |dk(  rd‰z  Š$ndŠ$d}d}t        d‰
z  «      }d|||‰|fz  }|j                  «       Š"d‰
z  }ddj                  |«      gŠ#t        d‰"«       t        d‰#«       |	xs t        Š%ˆˆˆfd„}ˆ"ˆˆ$ˆfd„Š ˆ#ˆˆ$ˆfd„Š!ˆˆ&ˆ
fd„ŠdŠ'ˆˆˆ'fd„Šˆˆˆ ˆ%ˆˆfd„}ˆˆ!ˆ%ˆˆfd „}ˆˆˆ%ˆfd!„}ˆˆ%ˆˆfd"„}t        t        t        t        t        t         t"        g}| j$                  j&                  d#   }|t(        gz   D ]  }|j+                  ||«       Œ | j$                  j&                  d$   }|d%v r0t        d&«       |D ]  }|j+                  ||«       Œ |t(        _        nUt        d'«       |D ],  }||j.                  v sŒ|j.                  j1                  |«       Œ. t(        j2                  t(        _        | j$                  j&                  d(   }|d)v r0t        d*«       |D ]  }|j+                  ||«       Œ |t(        _        nŠ|d+k(  r0t        d,«       |D ]  }|j+                  ||«       Œ |t(        _        nUt        d-«       |D ],  }||j.                  v sŒ|j.                  j1                  |«       Œ. t(        j2                  t(        _        | j$                  j&                  d.   }|d/v r0t        d0«       |D ]  }|j+                  ||«       Œ |t(        _        yt        d1«       |D ],  }||j.                  v sŒ|j.                  j1                  |«       Œ. t(        j2                  t(        _        y# t        $ r Y �Œ~w xY w)2z/Setup printing in IPython interactive session. ÚIPythonz1.0)Úmin_module_versionr   )Úlatex_to_pngNÚlightbgÚBlackÚlinuxÚWhiteÚGrayz*init_printing: Automatic foreground color:Úsvgz
\special{color %s}Ú Útightz0cm,0cmé–   z-T %s -D %d -bg %s -fg %s -O %sg«ªªªªª @z
--no-fontsz
--scale={}zinit_printing: DVIOPTIONS:zinit_printing: DVIOPTIONS_SVG:c                 ó®   •—  ‰| «      r|j                   ‰| «      «       y|j                  ‰j                  j                  j                  | «      «       y)z*caller for pretty, for use in IPython 0.11N)ÚtextÚlibÚpretty)r   ÚpÚcycler   Ú
_can_printr   s      €€€r   Ú_print_plainz,_init_ipython_printing.<locals>._print_plainP   s<   ø€ á�cŒ?Ø�F‰F‘> #Ó&Õ'à�F‰F�7—;‘;×%Ñ%×,Ñ,¨SÓ1Õ2r   c           
      ó°   •— t        «       }	 t        | dd‰|‰‰‰¬«       |j                  «       S # t        $ r}t        ddt	        |«      «       ‚ d }~ww xY w)NÚpngr   ©ÚoutputÚviewerÚeulerÚoutputbufferÚextra_preambleÚ
dvioptionsÚfontsizezpng printing:ú"_preview_wrapper exception raised:)r   r   Ú	Exceptionr   ÚreprÚgetvalue)ÚoÚ
exprbufferÚer4   r1   r3   r5   s      €€€€r   Ú_preview_wrapperz0_init_ipython_printing.<locals>._preview_wrapperW   sc   ø€ Ü“Yˆ
ð	Ü�A˜e¨I¸UØ!+¸NØ)°Hõ>ð ×"Ñ"Ó$Ð$øô ò 	ä�/Ð#GÜ�q“'ôàûð		ús   �0 °	A¹AÁAc           
      óÎ   •— t        «       }	 t        | dd‰|‰‰‰¬«       |j                  «       j                  d«      S # t        $ r}t        ddt	        |«      «       ‚ d }~ww xY w)Nr    r   r.   zsvg printing:r6   zutf-8)r   r   r7   r   r8   r9   Údecode)r:   r;   r<   Údvioptions_svgr1   r3   r5   s      €€€€r   Ú_svg_wrapperz,_init_ipython_printing.<locals>._svg_wrapperd   so   ø€ Ü“Yˆ
ð	Ü�A˜e¨I¸UØ!+¸NØ-¸õBð ×"Ñ"Ó$×+Ñ+¨GÓ4Ð4øô ò 	ä�/Ð#GÜ�q“'ôàûð		ús   �? ¿	A$ÁAÁA$c                 ó¢   •— 	 	  ‰| ‰‰¬«      S # t         $ r  ‰| «      cY S w xY w# t        $ r}t        dt        |«      «       Y d }~y d }~ww xY w)N)ÚcolorÚscalezmatplotlib exception caught:)Ú	TypeErrorÚ
ValueErrorr   r8   )r:   r<   Ú	forecolorr   rD   s     €€€r   Ú_matplotlib_wrapperz3_init_ipython_printing.<locals>._matplotlib_wrapperq   sV   ø€ ð	ð'Ù# A¨Y¸eÔDÐDøÜò 'Ù# A“Ò&ð'ûäò 	ÜÐ0´$°q³'Ô:Üûð	ús$   „
 �# & ¢#£& ¦	A¯A	Á	A)Ú_latexÚ	_sympystrÚ_prettyÚ
_sympyreprc                 óø  •‡ — 	 t         t        t        t        f}t	        ‰ |«      rQt        ‰ «      j                  d„ |D «       vst        ‰ «      j                  d„ |D «       vryt        ˆfd„‰ D «       «      S t	        ‰ t        «      rt        ˆˆ fd„‰ D «       «      S t	        ‰ t        «      ryt	        ‰ t        «      ryt        ˆ fd„‰D «       «      ryt	        ‰ t        t        f«      r‰ryy# t        $ r Y yw xY w)zÃReturn True if type o can be printed with one of the SymPy printers.

        If o is a container type, this is True if and only if every element of
        o can be printed in this way.
        c              3   ó4   K  — | ]  }|j                   –— Œ y ­w©N)Ú__str__©Ú.0Úis     r   Ú	<genexpr>z=_init_ipython_printing.<locals>._can_print.<locals>.<genexpr>’   s   è ø€ Ð+M¹}¸!¨A¯I­I¹}ùó   ‚c              3   ó4   K  — | ]  }|j                   –— Œ y ­wrO   )Ú__repr__rQ   s     r   rT   z=_init_ipython_printing.<locals>._can_print.<locals>.<genexpr>“   s   è ø€ Ð,OÁ¸A¨Q¯Z­ZÁùrU   Fc              3   ó.   •K  — | ]  } ‰|«      –— Œ y ­wrO   © )rR   rS   r*   s     €r   rT   z=_init_ipython_printing.<locals>._can_print.<locals>.<genexpr>•   s   øè ø€ Ð4±!¨Q™: aŸ=±!ùs   ƒc              3   óH   •K  — | ]  } ‰|«      xr  ‰‰|   «      –— Œ y ­wrO   rY   )rR   rS   r*   r:   s     €€r   rT   z=_init_ipython_printing.<locals>._can_print.<locals>.<genexpr>—   s'   øè ø€ ÐIÁqÀ!™: a›=Ò=©Z¸¸!¹Ó-=Ó=Áqùs   ƒ"Tc              3   ó6   •K  — | ]  }t        ‰|«      –— Œ y ­wrO   )Úhasattr)rR   Úhookr:   s     €r   rT   z=_init_ipython_printing.<locals>._can_print.<locals>.<genexpr>�   s   øè ø€ ÐA±.¨$”W˜Q ×%±.ùs   ƒ)ÚlistÚtupleÚsetÚ	frozensetÚ
isinstanceÚtyperP   rW   ÚallÚdictÚboolr   ÚanyÚfloatÚintÚRuntimeError)r:   Úbuiltin_typesr*   Úprint_builtinÚprinting_hookss   ` €€€r   r*   z*_init_ipython_printing.<locals>._can_printƒ   sÔ   ù€ ð	ô "¤5¬#¬yÐ9ˆMÜ˜!˜]Ô+ô ˜“G—O‘OÑ+M¹}Ó+MÑMÜ˜“G×$Ñ$Ñ,OÁÓ,OÑOØ ÜÓ4±!Ó4Ó4Ð4Ü˜AœtÔ$ÜÔIÁqÓIÓIÐIÜ˜AœtÔ$ØÜ˜AœyÔ)àÜÓA±.ÓAÔAàÜ˜A¤¤s˜|Ô,±ØØøÜò 	Ùð	ús6   „AC- Á#C- Á7$C- ÂC- Â-C- Â>C- ÃC- Ã-	C9Ã8C9c                 óÚ   •—  ‰| «      r ‰| fd‰i‰¤Ž}‰dk(  rd|z  }	  ‰|«      S y# t         $ r8}t        dt        |«      d«       ‰dk7  r ‰| fddi‰¤Ž} ‰|«      cY d}~S d}~ww xY w)zˆ
        A function that returns a png rendered by an external latex
        distribution, falling back to matplotlib rendering
        ÚmodeÚplainú$\displaystyle %s$úpreview failed with:z# Falling back to matplotlib backendÚinlineN©rj   r   r8   )	r:   Úsr<   r*   rH   r=   r   Ú
latex_moder   s	      €€€€€€r   Ú_print_latex_pngz0_init_ipython_printing.<locals>._print_latex_png©   s”   ø€ ñ
 �aŒ=Ù�aÑ5˜jÐ5¨HÑ5ˆAØ˜WÒ$Ø)¨AÑ-�ð.Ù'¨Ó*Ð*ð øô  ò .ÜÐ,¬d°1«gØ;ô=à Ò)Ù˜aÑ; hÐ;°(Ñ;�AÙ*¨1Ó-Õ-ûð.ús    ) ©	A*²-A%ÁA*Á%A*c                 óª   •—  ‰| «      r ‰| fd‰i‰¤Ž}‰dk(  rd|z  }	  ‰|«      S y# t         $ r }t        dt        |«      d«       Y d}~yd}~ww xY w)zz
        A function that returns a svg rendered by an external latex
        distribution, no fallback available.
        ro   rp   rq   rr   z No fallback available.Nrt   )r:   ru   r<   r*   rA   r   rv   r   s      €€€€€r   Ú_print_latex_svgz0_init_ipython_printing.<locals>._print_latex_svg»   sq   ø€ ñ
 �aŒ=Ù�aÑ5˜jÐ5¨HÑ5ˆAØ˜WÒ$Ø)¨AÑ-�ð1Ù# A“Ð&ð øô  ò 1ÜÐ,¬d°1«gØ/÷1ñ 1ûð1ús    ) ©	A²AÁAc                 ó<   •—  ‰| «      r ‰| fddi‰¤Ž} ‰|«      S y)zD
        A function that returns a png rendered by mathtext
        ro   rs   NrY   )r:   ru   r*   rH   r   r   s     €€€€r   Ú_print_latex_matplotlibz7_init_ipython_printing.<locals>._print_latex_matplotlibÊ   s0   ø€ ñ �aŒ=Ù�aÑ3˜hÐ3¨(Ñ3ˆAÙ& qÓ)Ð)ð r   c                 óD   •—  ‰| «      r ‰| fd‰i‰¤Ž}‰dk(  rd|z  S |S y)zW
        A function to generate the latex representation of SymPy expressions.
        ro   rp   rq   NrY   )r:   ru   r*   r   rv   r   s     €€€€r   Ú_print_latex_textz1_init_ipython_printing.<locals>._print_latex_textÒ   s=   ø€ ñ �aŒ=Ù�aÑ5˜jÐ5¨HÑ5ˆAØ˜WÒ$Ø,¨qÑ0Ð0ØˆHð	 r   z
text/plainzimage/svg+xml)r    z"init_printing: using svg formatterz*init_printing: not using any svg formatterz	image/png)Tr-   z"init_printing: using png formatterÚ
matplotlibz)init_printing: using matplotlib formatterz*init_printing: not using any png formatterz
text/latex)TÚmathjaxz&init_printing: using mathjax formatterz-init_printing: not using text/latex formatter)r   ÚIPython.lib.latextoolsr   ÚImportErrorÚcolorsÚlowerr   ÚroundÚsplitÚformatÚdefault_latexrh   r_   r^   r`   ra   re   ri   Údisplay_formatterÚ
formattersr   Úfor_typeÚ
_repr_svg_Útype_printersÚpopÚ_repr_disabledÚ
_repr_png_Ú_repr_latex_)(Úipr   Ú	use_latexr1   rG   Ú	backcolorr5   rv   rl   Úlatex_printerrD   r   rC   Ú	imagesizeÚoffsetÚ
resolutionÚdviÚ	svg_scaler+   rw   ry   r{   r}   Úprintable_typesÚplaintext_formatterÚclsÚsvg_formatterÚpng_formatterÚlatex_formatterr   r*   rH   r=   rA   r4   r@   r3   r   r   rm   s(    ` `` ``` ``                 @@@@@@@@@@@r   Ú_init_ipython_printingr    !   s€  ÿÿú€ ô ˜I¸%Ô@€GðÝ7ð ÐØ—	‘	—‘Ó!ˆØ�IÒØ‰IØ�gÒØ‰Ið ˆIÜÐ:¸IÔFà�EÒØ0°9Ñ<‰àˆà€IØ€FÜ�s˜5‘yÓ!€JØ
,Ø�:˜y¨)°Vð0=ñ =€Cà—‘“€Jà�u‘€IØ" L×$7Ñ$7¸	Ó$BÐC€Nä	Ð
&¨
Ô3Ü	Ð
*¨NÔ;àÒ*œ]€Eö3÷%÷5öð F€Nö!÷L.ñ .÷$1ð 1÷*÷ô œe¤T¬3´	¼4ÄÐE€Oà×.Ñ.×9Ñ9¸,ÑGÐð
 ¤) Ô,ˆØ×$Ñ$ S¨,Õ7ð -ð ×(Ñ(×3Ñ3°OÑD€MØ�IÑÜÐ2Ô3Û"ˆCØ×"Ñ" 3Ð(8Õ9ð #à/Œ	ÕäÐ:Ô;Û"ˆCð �m×1Ñ1Ò1Ø×+Ñ+×/Ñ/°Õ4ð	 #ô
  )×7Ñ7Œ	Ôà×(Ñ(×3Ñ3°KÑ@€MØ�MÑ!ÜÐ2Ô3Û"ˆCØ×"Ñ" 3Ð(8Õ9ð #à/Œ	ÕØ	�lÒ	"ÜÐ9Ô:Û"ˆCØ×"Ñ" 3Ð(?Õ@ð #à6Œ	ÕäÐ:Ô;Û"ˆCð �m×1Ñ1Ò1Ø×+Ñ+×/Ñ/°Õ4ð	 #ô
  )×7Ñ7Œ	Ôà×*Ñ*×5Ñ5°lÑC€OØÐ%Ñ%ÜÐ6Ô7Û"ˆCØ×$Ñ$ SÐ*;Õ<ð #à!2Œ	ÕäÐ=Ô>Û"ˆCð �o×3Ñ3Ò3Ø×-Ñ-×1Ñ1°#Õ6ð	 #ô
 "+×!9Ñ!9Œ	Õøôe ò Úðús   ¢N Î	N'Î&N'c                 óŒ   — ddl m} d|vry	 ddlm} t        | |«      S # t        $ r 	 ddlm} n# t        $ r Y Y yw xY wY Œ/w xY w)z%Is a shell instance an IPython shell?r   )Úmodulesr   F)ÚInteractiveShell)r   r¢   ÚIPython.core.interactiveshellr£   r�   ÚIPython.iplibrb   )Úshellr¢   r£   s      r   Ú_is_ipythonr§     s\   € õ Ø˜ÑØð	ÝBô �eÐ-Ó.Ð.øô ò ð	Þ6øÜò 	ò ð	úñ 7ðús*   � Ÿ	A©0¯A°	=¹A¼=½AÁAFNc                 óv  ‡‡‡‡‡— ddl }ddlm} | r|�|}nddlm} n|�|}nddlm} d}|€	 t        «       }|du}|r|st        |«      }|rY| rW	 ddl	m
} ddlm} t        |||f«      s<d	d
j                  |j                  «      vr‰€t!        d«       dŠ|€t!        d«       d}	 t$        s|s|j'                  ‰‰‰‰¬«       n|Š| r
ˆˆˆˆˆfd„}nˆˆfd„}|r6|j)                  dd«      }|rt!        d«       t+        |||||	|
|||||fi |¤Ž yt-        |fi |¤Ž y# t        $ r Y Œìw xY w# t"        $ r Y Œ‘w xY w)a,  
    Initializes pretty-printer depending on the environment.

    Parameters
    ==========

    pretty_print : bool, default=True
        If ``True``, use :func:`~.pretty_print` to stringify or the provided pretty
        printer; if ``False``, use :func:`~.sstrrepr` to stringify or the provided string
        printer.
    order : string or None, default='lex'
        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 : bool or None, default=None
        If ``True``, use unicode characters;
        if ``False``, do not use unicode characters;
        if ``None``, make a guess based on the environment.
    use_latex : string, bool, or None, default=None
        If ``True``, use default LaTeX rendering in GUI interfaces (png and
        mathjax);
        if ``False``, do not use LaTeX rendering;
        if ``None``, make a guess based on the environment;
        if ``'png'``, enable LaTeX rendering with an external LaTeX compiler,
        falling back to matplotlib if external compilation fails;
        if ``'matplotlib'``, enable LaTeX rendering with matplotlib;
        if ``'mathjax'``, enable LaTeX text generation, for example MathJax
        rendering in IPython notebook or text rendering in LaTeX documents;
        if ``'svg'``, enable LaTeX rendering with an external latex compiler,
        no fallback
    wrap_line : bool
        If True, lines will wrap at the end; if False, they will not wrap
        but continue as one line. This is only relevant if ``pretty_print`` is
        True.
    num_columns : int or None, default=None
        If ``int``, number of columns before wrapping is set to num_columns; if
        ``None``, number of columns before wrapping is set to terminal width.
        This is only relevant if ``pretty_print`` is ``True``.
    no_global : bool, default=False
        If ``True``, the settings become system wide;
        if ``False``, use just for this console/session.
    ip : An interactive console
        This can either be an instance of IPython,
        or a class that derives from code.InteractiveConsole.
    euler : bool, optional, default=False
        Loads the euler package in the LaTeX preamble for handwritten style
        fonts (https://www.ctan.org/pkg/euler).
    forecolor : string or None, optional, default=None
        DVI setting for foreground color. ``None`` means that either ``'Black'``,
        ``'White'``, or ``'Gray'`` will be selected based on a guess of the IPython
        terminal color setting. See notes.
    backcolor : string, optional, default='Transparent'
        DVI setting for background color. See notes.
    fontsize : string or int, optional, default='10pt'
        A font size to pass to the LaTeX documentclass function in the
        preamble. Note that the options are limited by the documentclass.
        Consider using scale instead.
    latex_mode : string, optional, default='plain'
        The mode used in the LaTeX printer. Can be one of:
        ``{'inline'|'plain'|'equation'|'equation*'}``.
    print_builtin : boolean, optional, default=True
        If ``True`` then floats and integers will be printed. If ``False`` the
        printer will only print SymPy types.
    str_printer : function, optional, default=None
        A custom string printer function. This should mimic
        :func:`~.sstrrepr`.
    pretty_printer : function, optional, default=None
        A custom pretty printer. This should mimic :func:`~.pretty`.
    latex_printer : function, optional, default=None
        A custom LaTeX printer. This should mimic :func:`~.latex`.
    scale : float, optional, default=1.0
        Scale the LaTeX output when using the ``'png'`` or ``'svg'`` backends.
        Useful for high dpi screens.
    settings :
        Any additional settings for the ``latex`` and ``pretty`` commands can
        be used to fine-tune the output.

    Examples
    ========

    >>> from sympy.interactive import init_printing
    >>> from sympy import Symbol, sqrt
    >>> from sympy.abc import x, y
    >>> sqrt(5)
    sqrt(5)
    >>> init_printing(pretty_print=True) # doctest: +SKIP
    >>> sqrt(5) # doctest: +SKIP
      ___
    \/ 5
    >>> theta = Symbol('theta') # doctest: +SKIP
    >>> init_printing(use_unicode=True) # doctest: +SKIP
    >>> theta # doctest: +SKIP
    \u03b8
    >>> init_printing(use_unicode=False) # doctest: +SKIP
    >>> theta # doctest: +SKIP
    theta
    >>> init_printing(order='lex') # doctest: +SKIP
    >>> str(y + x + y**2 + x**2) # doctest: +SKIP
    x**2 + x + y**2 + y
    >>> init_printing(order='grlex') # doctest: +SKIP
    >>> str(y + x + y**2 + x**2) # doctest: +SKIP
    x**2 + x + y**2 + y
    >>> init_printing(order='grevlex') # doctest: +SKIP
    >>> str(y * x**2 + x * y**2) # doctest: +SKIP
    x**2*y + x*y**2
    >>> init_printing(order='old') # doctest: +SKIP
    >>> str(x**2 + y**2 + x + y) # doctest: +SKIP
    x**2 + x + y**2 + y
    >>> init_printing(num_columns=10) # doctest: +SKIP
    >>> x**2 + x + y**2 + y # doctest: +SKIP
    x + y +
    x**2 + y**2

    Notes
    =====

    The foreground and background colors can be selected when using ``'png'`` or
    ``'svg'`` LaTeX rendering. Note that before the ``init_printing`` command is
    executed, the LaTeX rendering is handled by the IPython console and not SymPy.

    The colors can be selected among the 68 standard colors known to ``dvips``,
    for a list see [1]_. In addition, the background color can be
    set to  ``'Transparent'`` (which is the default value).

    When using the ``'Auto'`` foreground color, the guess is based on the
    ``colors`` variable in the IPython console, see [2]_. Hence, if
    that variable is set correctly in your IPython console, there is a high
    chance that the output will be readable, although manual settings may be
    needed.


    References
    ==========

    .. [1] https://en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips

    .. [2] https://ipython.readthedocs.io/en/stable/config/details.html#terminal-colors

    See Also
    ========

    sympy.printing.latex
    sympy.printing.pretty

    r   N)ÚPrinter)r'   )ÚsstrreprF)ÚTerminalInteractiveShell)ÚInteractiveConsolezipython-consoler!   z*init_printing: Setting use_unicode to TrueTz(init_printing: Setting use_latex to True©ÚorderÚuse_unicodeÚ	wrap_lineÚnum_columnsc                 ó    •—  ‰| f‰‰‰‰dœ|¤ŽS )Nr­   rY   )Úexprr   Ú_stringify_funcr±   r®   r¯   r°   s     €€€€€r   Ú<lambda>zinit_printing.<locals>.<lambda>ÿ  s'   ø€ Ù,¨Tð 9¸Ø9DØ7@Ø9Dñ9ð 08ò	9r   c                 ó   •—  ‰| fd‰i|¤ŽS )Nr®   rY   )r³   r   r´   r®   s     €€r   rµ   zinit_printing.<locals>.<lambda>  s   ø€ ©Øñ*3Ø %ð*3Ø)1ò*3r   ro   zMinit_printing: Mode is not able to be set due to internalsof IPython printing)r   Úsympy.printing.printerr©   Úsympy.printingr'   rª   Úget_ipythonÚ	NameErrorr§   Ú!IPython.terminal.interactiveshellr«   Úcoder¬   rb   ÚjoinÚargvr   r�   Ú	NO_GLOBALÚset_global_settingsr�   r    r   )Úpretty_printr®   r¯   r’   r°   r±   Ú	no_globalr‘   r1   rG   r“   r5   rv   rl   Ústr_printerÚpretty_printerr”   rD   r   r   r©   r   Ú
in_ipythonr«   r¬   Úmode_in_settingsr´   s    `` ``                    @r   Úinit_printingrÇ   1  s€  ü€ óv Ý.áØÐ%Ø+‰Næ?àÐ"Ø(‰NåAð €JØ	€zð	*Ü“ˆBð  D˜.ˆJá	‘*Ü  “_ˆ
á‘lð	%ÝRÝ/ô
 ˜bÐ#5Ð7OÐ"PÔQØ)°·±¸¿¹Ó1BÑBØÐ&ÜÐFÔGØ"&�KØÐ$ÜÐDÔEØ $‘Iå™YØ×#Ñ#¨%¸[Ø.7À[ð 	$õ 	Rð )ˆá÷9‰Nô3ð ñ Ø#Ÿ<™<¨°Ó5ÐÙÜð (ô )ä˜r >°9¸eØ(¨)°X¸zØ,¨m¸Uñ	+ð "*ó	+ô
 	˜nÑ9°Ó9øôk ò 	Ùð	ûô ò 	Ùð	ús#   ®
D ÁD, Ä	D)Ä(D)Ä,	D8Ä7D8)TNNNNNFNFNÚTransparentÚ10ptrp   TNNNg      ð?)Ú__doc__Úior   Úsympy.printing.latexr   r‡   Úsympy.printing.previewr   Úsympy.utilities.miscr   Úsympy.printing.defaultsr   Úsympy.externalr   r   r    r§   r¿   rÇ   rY   r   r   Ú<module>rÑ      sM   ðÙ =å å 7Ý *Ý &Ý -Ý (ò#ò*y:òv/ð& €	à=AØ>BØCGØ4:Ø48Ø37Ø,/ôc:r   