Module ImportFrom alias alias ImportFrom alias Import alias Import alias Import alias ImportFrom alias TryExcept body ImportFrom alias alias alias handlers ExceptHandler type NameLoad body Pass ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad kwarg body Expr Str Assign NameStore ListLoad Str If CompareIs NameLoad NameLoad body If CompareEq NameLoad Str body Assign NameStore Str orelse Assign NameStore Dict Str Str Str ListLoad Str Str Str Str ListLoad Str Str Str Str ListLoad Str Str Str Str Str Str TryExcept body For NameStore SubscriptLoad NameLoad Index NameLoad body Assign NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad Break orelse Raise Call NameLoad BinOpMod Str NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad orelse If CompareEq NameLoad Str body If CompareIs NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad keyword Str keyword Str keyword Str keyword Num attr orelse If CompareEq NameLoad Str body Expr Call AttributeLoad Call NameLoad keyword Str keyword Str keyword Str keyword Num attr Assign NameStore Str If CompareIs NameLoad NameLoad body Raise Call NameLoad Str orelse If CompareEq NameLoad Str body If CompareIs NameLoad NameLoad body Raise Call NameLoad Str orelse If BoolOpAnd CompareNotIn NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad If CompareIs NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad TupleLoad Str Str If NameLoad body AugAssignAdd NameStore TupleLoad Str Assign NameStore BinOpAdd Str Call AttributeLoad Str attr ListComp BinOpMod Str NameLoad comprehension NameStore NameLoad Assign NameStore BinOpMod Str NameLoad orelse If CompareGt Call NameLoad NameLoad Num body Raise Call NameLoad Str Assign NameStore BinOpAdd BinOpAdd NameLoad Str Str If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore Call NameLoad NameLoad keyword Str NameLoad TryFinally body Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Str keyword Str NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Call NameLoad NameLoad Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str NameLoad If UnaryOpNot Call NameLoad Str body Raise Call NameLoad Str TryExcept body Expr Call NameLoad ListLoad Str Str Str Str keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr If CompareNotEq NameLoad Str body Assign NameStore Dict Str Str Str Str ListLoad ListLoad ListLoad Str Str Str Str Str ListLoad Str Assign NameStore Dict Str Str Str Str ListLoad Str Str Str ListLoad Str Str ListLoad Str Str Str ListLoad Str Str Str If CompareEq NameLoad Str body Assign NameStore ListLoad Str orelse Assign NameStore ListLoad BinOpAdd Str NameLoad If UnaryOpNot Call NameLoad SubscriptLoad NameLoad Index Num body Raise Call NameLoad BinOpMod Str SubscriptLoad NameLoad Index Num TryExcept body If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad TryExcept body Expr Call NameLoad NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpMod Str TupleLoad Call AttributeLoad Str attr NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpMod Str NameLoad If CompareEq NameLoad Str body If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad With Call NameLoad Call NameLoad NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body With Call NameLoad Call NameLoad NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body TryExcept body ImportFrom alias alias alias ImportFrom alias handlers ExceptHandler type NameLoad body Raise Call NameLoad Str If CompareEq NameLoad Str body ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad keyword Call NameLoad orelse Raise Call NameLoad Str Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword BinOpAdd AttributeLoad NameLoad attr BinOpMult Num NameLoad keyword BinOpAdd AttributeLoad NameLoad attr BinOpMult Num NameLoad keyword Str keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body FunctionDef arguments args defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list Assign AttributeStore NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad decorator_list Assign AttributeStore NameLoad attr NameLoad FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr Num Num Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpDiv BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num BinOpDiv BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list Assign AttributeStore NameLoad attr NameLoad While UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass Expr Call AttributeLoad NameLoad attr orelse TryExcept body Expr Call NameLoad ListLoad NameLoad NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr finalbody TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareNotEq AttributeLoad NameLoad attr Num body Raise decorator_list Call NameLoad keyword TupleLoad Str Str keyword TupleLoad Str keyword TupleLoad Str Str Str
N/A __future__ print_function division os.path join N/A tempfile N/A shutil N/A io io BytesIO N/A N/A subprocess STDOUT CalledProcessError check_output N/A N/A N/A ImportError N/A N/A sympy.core.compatibility unicode u_decode sympy.utilities.exceptions SymPyDeprecationWarning sympy.utilities.misc find_executable latex latex sympy.utilities.decorator doctest_depends_on preview N/A N/A expr output viewer euler packages filename outputbuffer preamble dvioptions outputTexFile N/A png None True N/A None None None None None latex_settings N/A N/A 
    View expression or LaTeX markup in PNG, DVI, PostScript or PDF form.

    If the expr argument is an expression, it will be exported to LaTeX and
    then compiled using the available TeX distribution.  The first argument,
    'expr', may also be a LaTeX string.  The function will then run the
    appropriate viewer for the given output format or use the user defined
    one. By default png output is generated.

    By default pretty Euler fonts are used for typesetting (they were used to
    typeset the well known "Concrete Mathematics" book). For that to work, you
    need the 'eulervm.sty' LaTeX style (in Debian/Ubuntu, install the
    texlive-fonts-extra package). If you prefer default AMS fonts or your
    system lacks 'eulervm' LaTeX package then unset the 'euler' keyword
    argument.

    To use viewer auto-detection, lets say for 'png' output, issue

    >>> from sympy import symbols, preview, Symbol
    >>> x, y = symbols("x,y")

    >>> preview(x + y, output='png')

    This will choose 'pyglet' by default. To select a different one, do

    >>> preview(x + y, output='png', viewer='gimp')

    The 'png' format is considered special. For all other formats the rules
    are slightly different. As an example we will take 'dvi' output format. If
    you would run

    >>> preview(x + y, output='dvi')

    then 'view' will look for available 'dvi' viewers on your system
    (predefined in the function, so it will try evince, first, then kdvi and
    xdvi). If nothing is found you will need to set the viewer explicitly.

    >>> preview(x + y, output='dvi', viewer='superior-dvi-viewer')

    This will skip auto-detection and will run user specified
    'superior-dvi-viewer'. If 'view' fails to find it on your system it will
    gracefully raise an exception.

    You may also enter 'file' for the viewer argument. Doing so will cause
    this function to return a file object in read-only mode, if 'filename'
    is unset. However, if it was set, then 'preview' writes the genereted
    file to this filename instead.

    There is also support for writing to a BytesIO like object, which needs
    to be passed to the 'outputbuffer' argument.

    >>> from io import BytesIO
    >>> obj = BytesIO()
    >>> preview(x + y, output='png', viewer='BytesIO',
    ...         outputbuffer=obj)

    The LaTeX preamble can be customized by setting the 'preamble' keyword
    argument. This can be used, e.g., to set a different font size, use a
    custom documentclass or import certain set of LaTeX packages.

    >>> preamble = "\\documentclass[10pt]{article}\n" \
    ...            "\\usepackage{amsmath,amsfonts}\\begin{document}"
    >>> preview(x + y, output='png', preamble=preamble)

    If the value of 'output' is different from 'dvi' then command line
    options can be set ('dvioptions' argument) for the execution of the
    'dvi'+output conversion tool. These options have to be in the form of a
    list of strings (see subprocess.Popen).

    Additional keyword args will be passed to the latex call, e.g., the
    symbol_names flag.

    >>> phidd = Symbol('phidd')
    >>> preview(phidd, symbol_names={phidd:r'\ddot{\varphi}'})

    For post-processing the generated TeX File can be written to a file by
    passing the desired filename to the 'outputTexFile' keyword
    argument. To write the TeX code to a file named
    "sample.tex" and run the default png viewer to display the resulting
    bitmap, do

    >>> preview(x + y, outputTexFile="sample.tex")


     N/A special N/A pyglet N/A N/A viewer None N/A N/A N/A output png N/A N/A viewer pyglet N/A N/A candidates N/A dvi ps pdf N/A evince okular kdvi xdvi N/A evince okular gsview gv N/A evince okular kpdf acroread xpdf gv N/A N/A N/A candidate N/A candidates N/A output N/A N/A path N/A find_executable candidate N/A N/A path None N/A N/A viewer path N/A N/A N/A N/A SystemError N/A No viewers found for '%s' output format. output N/A N/A N/A KeyError N/A N/A N/A SystemError N/A Invalid output format: %s output N/A N/A N/A viewer file N/A N/A N/A filename None N/A N/A N/A N/A N/A SymPyDeprecationWarning feature Using viewer="file" without a specified filename deprecated_since_version 0.7.3 useinstead viewer="file" and filename="desiredname" issue 7018 warn N/A N/A N/A viewer StringIO N/A N/A N/A N/A N/A SymPyDeprecationWarning feature The preview() viewer StringIO useinstead BytesIO deprecated_since_version 0.7.4 issue 7083 warn N/A viewer BytesIO N/A N/A outputbuffer None N/A N/A N/A ValueError outputbuffer has to be a BytesIO compatible object if viewer="StringIO" N/A N/A N/A viewer BytesIO N/A N/A N/A outputbuffer None N/A N/A N/A ValueError outputbuffer has to be a BytesIO compatible object if viewer="BytesIO" N/A N/A N/A N/A viewer special N/A N/A find_executable viewer N/A N/A N/A SystemError N/A Unrecognized viewer: %s viewer N/A N/A preamble None N/A N/A actual_packages N/A packages N/A amsmath amsfonts N/A euler N/A N/A actual_packages N/A euler N/A package_includes N/A N/A N/A join N/A N/A \usepackage{%s} p N/A p actual_packages N/A preamble N/A \documentclass[12pt]{article}
\pagestyle{empty}
%s

\begin{document}
 package_includes N/A N/A N/A N/A len packages 0 N/A N/A N/A ValueError The "packages" keyword must not be set if a custom LaTeX preamble was specified N/A latex_main N/A N/A preamble 
%s

 \end{document} N/A N/A isinstance expr str N/A N/A latex_string expr N/A N/A latex_string N/A latex expr mode inline latex_settings N/A N/A N/A workdir N/A N/A tempfile mkdtemp N/A N/A N/A io open N/A join workdir texput.tex w encoding utf-8 fh N/A N/A N/A N/A fh write N/A N/A unicode latex_main N/A u_decode latex_string N/A N/A outputTexFile None N/A N/A N/A N/A shutil copyfile N/A join workdir texput.tex outputTexFile N/A N/A N/A find_executable latex N/A N/A N/A RuntimeError latex program is not installed N/A N/A N/A N/A check_output N/A latex -halt-on-error -interaction=nonstopmode texput.tex cwd workdir stderr STDOUT N/A N/A N/A CalledProcessError N/A e N/A N/A N/A RuntimeError N/A 'latex' exited abnormally with the following output:
%s N/A e output N/A N/A output dvi N/A N/A defaultoptions N/A ps pdf png svg N/A N/A N/A -T tight -z 9 --truecolor N/A --no-fonts N/A commandend N/A ps pdf png svg N/A -o texput.ps texput.dvi N/A texput.dvi texput.pdf N/A -o texput.png texput.dvi N/A -o texput.svg texput.dvi N/A N/A output svg N/A N/A cmd N/A dvisvgm N/A N/A cmd N/A N/A dvi output N/A N/A N/A find_executable N/A cmd N/A 0 N/A N/A N/A RuntimeError N/A %s is not installed N/A cmd N/A 0 N/A N/A N/A N/A dvioptions None N/A N/A N/A N/A cmd extend dvioptions N/A N/A N/A N/A cmd extend N/A defaultoptions N/A output N/A N/A N/A cmd extend N/A commandend N/A output N/A N/A N/A KeyError N/A N/A N/A SystemError N/A Invalid output format: %s output N/A N/A N/A N/A check_output cmd cwd workdir stderr STDOUT N/A N/A N/A CalledProcessError N/A e N/A N/A N/A RuntimeError N/A '%s' exited abnormally with the following output:
%s N/A N/A N/A join cmd N/A e output N/A src N/A texput.%s output N/A N/A viewer file N/A N/A N/A filename None N/A N/A buffer N/A BytesIO N/A N/A open N/A join workdir src rb fh N/A N/A N/A N/A buffer write N/A N/A fh read N/A buffer N/A N/A N/A N/A shutil move N/A join workdir src filename N/A N/A N/A viewer BytesIO N/A N/A N/A open N/A join workdir src rb fh N/A N/A N/A N/A outputbuffer write N/A N/A fh read N/A N/A N/A viewer pyglet N/A N/A N/A pyglet window image gl pyglet.window key N/A N/A N/A ImportError N/A N/A N/A ImportError pyglet is required for preview.
 visit http://www.pyglet.org/ N/A N/A output png N/A pyglet.image.codecs.png PNGImageDecoder N/A img N/A N/A image load N/A join workdir src decoder N/A PNGImageDecoder N/A N/A N/A SystemError pyglet preview works only for 'png' files. N/A offset 25 N/A config N/A N/A gl Config double_buffer False N/A win N/A N/A window Window width N/A N/A img width N/A 2 offset height N/A N/A img height N/A 2 offset caption sympy resizable False config config N/A N/A N/A win set_vsync False N/A N/A on_close N/A N/A N/A N/A N/A N/A win has_exit True N/A N/A N/A win on_close on_close on_key_press N/A N/A symbol modifiers N/A N/A N/A N/A symbol N/A N/A key Q N/A key ESCAPE N/A N/A N/A on_close N/A N/A N/A win on_key_press on_key_press on_expose N/A N/A N/A N/A N/A N/A N/A gl glClearColor 1.0 1.0 1.0 1.0 N/A N/A N/A gl glClear N/A gl GL_COLOR_BUFFER_BIT N/A N/A N/A img blit N/A N/A N/A win width N/A img width 2 N/A N/A N/A win height N/A img height 2 N/A N/A N/A win on_expose on_expose N/A N/A N/A win has_exit N/A N/A N/A N/A win dispatch_events N/A N/A N/A win flip N/A N/A N/A KeyboardInterrupt N/A N/A N/A N/A N/A win close N/A N/A N/A N/A N/A check_output N/A viewer src cwd workdir stderr STDOUT N/A N/A N/A CalledProcessError N/A e N/A N/A N/A RuntimeError N/A '%s %s' exited abnormally with the following output:
%s N/A viewer src N/A e output N/A N/A N/A N/A N/A N/A shutil rmtree workdir N/A N/A N/A OSError N/A e N/A N/A N/A N/A e errno 2 N/A N/A N/A N/A doctest_depends_on exe N/A latex dvipng modules N/A pyglet disable_viewers N/A evince gimp superior-dvi-viewer