Re: [sympy] Pretty Printing in Docstrings

2016-08-16 Thread Aaron Meurer
The docstring pprint is doing to use the ASCII pretty printer. If you
haven't implemented ASCII pretty printing, then it is going to fall back to
using the str printer.

You can disable the line wrapping with pprint(wrap_line=False).

Aaron Meurer

On Tue, Aug 16, 2016 at 5:06 AM, SAMPAD SAHA  wrote:

> At terminal it is pretty printing the result but in the docstrings it is
> just wrapping the text into next line.
>
> At terminal:
> In [14]: pprint(b.load)
>   -1-1 0
> R₁⋅   + R₂⋅   + 6⋅
>
> At docstrings:
> >>> b.load
> R1*SingularityFunction(x, 0, -1) + R2*SingularityFunction(x, 4, -1) +
> 6*SingularityFunction(x, 2, 0)
>
> >>> pprint(b.load)
> R1*SingularityFunction(x, 0, -1) + R2*SingularityFunction(x, 4, -1) +
> 6*Singul
> arityFunction(x, 2, 0)
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Tue, Aug 16, 2016 at 8:04 AM, Aaron Meurer  wrote:
>
>> The simplest way is to just call pprint manually.
>>
>> Aaron Meurer
>>
>>
>> On Monday, August 15, 2016, SAMPAD SAHA  wrote:
>>
>>> How to enable pretty printing in the docstrings?
>>>
>>> Regards
>>> Sampad Kumar Saha
>>> Mathematics and Computing
>>> I.I.T. Kharagpur
>>>
>>>
>>>
>>> --
>>> 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 sympy+unsubscr...@googlegroups.com.
>>> To post to this group, send email to sympy@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/sympy.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/sympy/CANzav4Gv4xQcf-8c3gZ7u7FEkJ2WBHziVmkfqxaxwUogkmsha
>>> Q%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 sympy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sympy.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/sympy/CAKgW%3D6%2BeXsMf5bDTBo-8mzUA%2B2eAa6sc6XB--t_
>> wKuQy1XAjFQ%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/sympy/CANzav4HrntqZPcFW%2BwL51Vir621iK908rCkeo9ksxubXD
> cmxng%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BaVT3RK8JvpdHh5vm1dUSNhVHD_Za4j_-re9uVwJ6_UQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Pretty Printing in Docstrings

2016-08-16 Thread SAMPAD SAHA
At terminal it is pretty printing the result but in the docstrings it is
just wrapping the text into next line.

At terminal:
In [14]: pprint(b.load)
  -1-1 0
R₁⋅   + R₂⋅   + 6⋅

At docstrings:
>>> b.load
R1*SingularityFunction(x, 0, -1) + R2*SingularityFunction(x, 4, -1) +
6*SingularityFunction(x, 2, 0)

>>> pprint(b.load)
R1*SingularityFunction(x, 0, -1) + R2*SingularityFunction(x, 4, -1) +
6*Singul
arityFunction(x, 2, 0)




Regards
Sampad Kumar Saha
Mathematics and Computing
I.I.T. Kharagpur

On Tue, Aug 16, 2016 at 8:04 AM, Aaron Meurer  wrote:

> The simplest way is to just call pprint manually.
>
> Aaron Meurer
>
>
> On Monday, August 15, 2016, SAMPAD SAHA  wrote:
>
>> How to enable pretty printing in the docstrings?
>>
>> Regards
>> Sampad Kumar Saha
>> Mathematics and Computing
>> I.I.T. Kharagpur
>>
>>
>>
>> --
>> 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 sympy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sympy.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/sympy/CANzav4Gv4xQcf-8c3gZ7u7FEkJ2WBHziVmkfqxaxwUogkmsha
>> Q%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/sympy/CAKgW%3D6%2BeXsMf5bDTBo-8mzUA%2B2eAa6sc6XB--t_wKuQy1XAjFQ%
> 40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CANzav4HrntqZPcFW%2BwL51Vir621iK908rCkeo9ksxubXDcmxng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Pretty Printing in Docstrings

2016-08-15 Thread Aaron Meurer
The simplest way is to just call pprint manually.

Aaron Meurer

On Monday, August 15, 2016, SAMPAD SAHA  wrote:

> How to enable pretty printing in the docstrings?
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
>
>
> --
> 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 sympy+unsubscr...@googlegroups.com
> .
> To post to this group, send email to sympy@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/sympy/CANzav4Gv4xQcf-8c3gZ7u7FEkJ2WBHziVmkfqxaxwUog
> kmshaQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BeXsMf5bDTBo-8mzUA%2B2eAa6sc6XB--t_wKuQy1XAjFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Pretty Printing in Docstrings

2016-08-15 Thread SAMPAD SAHA
How to enable pretty printing in the docstrings?

Regards
Sampad Kumar Saha
Mathematics and Computing
I.I.T. Kharagpur

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CANzav4Gv4xQcf-8c3gZ7u7FEkJ2WBHziVmkfqxaxwUogkmshaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.