Hi Christophe,

On Mon, Mar 3, 2014 at 8:30 AM, Christophe Bal <[email protected]> wrote:
> Hello.
>
> Is there an equivalent of FullForm that produces simple treeview of a
> formula ? Here is basic example seen in a video.
>
> FullForm[x**2+x**3] = Plus[Power[x, 2], Power[y, 3]]

We have this:

In [1]: print_tree(x**2+x**3)
Add: x**3 + x**2
+-Pow: x**3
| +-Symbol: x
| | commutative: True
| +-Integer: 3
|   real: True
|   nonzero: True
|   infinitesimal: False
|   commutative: True
|   zero: False
|   nonpositive: False
|   positive: True
|   noninteger: False
|   negative: False
|   nonnegative: True
|   hermitian: True
|   complex: True
|   bounded: True
|   rational: True
|   unbounded: False
|   integer: True
|   imaginary: False
|   finite: True
|   irrational: False
+-Pow: x**2
  +-Symbol: x
  | commutative: True
  +-Integer: 2
    real: True
    nonzero: True
    finite: True
    commutative: True
    infinitesimal: False
    nonpositive: False
    positive: True
    noninteger: False
    zero: False
    negative: False
    hermitian: True
    complex: True
    bounded: True
    rational: True
    unbounded: False
    integer: True
    imaginary: False
    nonnegative: True
    irrational: False


and also this:

In [9]: print_python(x**2+x**3)
x = Symbol('x')
e = x**3 + x**2


Ondrej

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CADDwiVA-uvFjvHDHVb%3D5BJ2NLEOv0j4bMZhUm9hSwfxG-ZG6uQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to