Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.maple > #1377 > unrolled thread

Printing in Jupyter notebooks

Started by"peter....@gmail.com" <peter.luschny@gmail.com>
First post2023-04-29 11:44 -0700
Last post2023-05-04 14:35 -0700
Articles 6 — 4 participants

Back to article view | Back to comp.soft-sys.math.maple


Contents

  Printing in Jupyter notebooks "peter....@gmail.com" <peter.luschny@gmail.com> - 2023-04-29 11:44 -0700
    Re: Printing in Jupyter notebooks Jerry Place <jerryplace.01@gmail.com> - 2023-04-29 12:59 -0700
      Re: Printing in Jupyter notebooks Rainer Rosenthal <r.rosenthal@web.de> - 2023-04-29 23:28 +0200
        Re: Printing in Jupyter notebooks "peter....@gmail.com" <peter.luschny@gmail.com> - 2023-04-29 22:31 -0700
          Re: Printing in Jupyter notebooks Rainer Rosenthal <r.rosenthal@web.de> - 2023-04-30 16:03 +0200
            Re: Printing in Jupyter notebooks jfh <harperjf2@gmail.com> - 2023-05-04 14:35 -0700

#1377 — Printing in Jupyter notebooks

From"peter....@gmail.com" <peter.luschny@gmail.com>
Date2023-04-29 11:44 -0700
SubjectPrinting in Jupyter notebooks
Message-ID<c3ecfbbc-5729-4f75-9861-65e7f4bd6315n@googlegroups.com>
> for n from 0 to 5 do print(n) od;

What do you expect to see?
Well, in Jupyter Notebooks I see: "5".

How to fix this?

[toc] | [next] | [standalone]


#1378

FromJerry Place <jerryplace.01@gmail.com>
Date2023-04-29 12:59 -0700
Message-ID<4920d869-beec-44d2-9d76-741a8764d77an@googlegroups.com>
In reply to#1377
On Saturday, April 29, 2023 at 1:44:03 PM UTC-5, peter....@gmail.com wrote:
> > for n from 0 to 5 do print(n) od; 
> 
> What do you expect to see? 
> Well, in Jupyter Notebooks I see: "5". 
> 
> How to fix this?
    |\^/|     Maple 18 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2014
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> for n from 0 to 5 do print(n) od;
                                       0

                                       1

                                       2

                                       3

                                       4

                                       5

[toc] | [prev] | [next] | [standalone]


#1379

FromRainer Rosenthal <r.rosenthal@web.de>
Date2023-04-29 23:28 +0200
Message-ID<kb5ggeFi4ooU3@mid.individual.net>
In reply to#1378
Am 29.04.2023 um 21:59 schrieb Jerry Place:
> On Saturday, April 29, 2023 at 1:44:03 PM UTC-5, peter....@gmail.com wrote:
>>> for n from 0 to 5 do print(n) od;
>>
>> What do you expect to see?
>> Well, in Jupyter Notebooks I see: "5".
>>
>> How to fix this?
>      |\^/|     Maple 18 (X86 64 LINUX)
> ._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2014
>   \  MAPLE  /  All rights reserved. Maple is a trademark of
>   <____ ____>  Waterloo Maple Inc.
>        |       Type ? for help.
>> for n from 0 to 5 do print(n) od;
>                                         0
> 
>                                         1
> 
>                                         2
> 
>                                         3
> 
>                                         4
> 
>                                         5
> 

So maybe it's a problem with carriage return / line feed, i.e., the 
lines are printed without line feed?

Cheers,
Rainer

[toc] | [prev] | [next] | [standalone]


#1380

From"peter....@gmail.com" <peter.luschny@gmail.com>
Date2023-04-29 22:31 -0700
Message-ID<e0002139-6ca5-418b-9cb6-7bdc2cff0a9en@googlegroups.com>
In reply to#1379
RR> So maybe it's a problem with carriage return / line feed, i.e., the 
RR> lines are printed without line feed? 

No, wouldn't you expect in this case the output "0 1 2 3 4 5"?
The output is "5", as I wrote.

So I tried two workarounds, but same result with:

> for n from 0 to 5 do lprint(n) od;

and with:

> for n from 0 to 5 do
>     printf("%g\n", n);
> end do

---
Greetings to good old Vladimir:
https://www.cybertester.com/images/bug-ass.jpg

[toc] | [prev] | [next] | [standalone]


#1383

FromRainer Rosenthal <r.rosenthal@web.de>
Date2023-04-30 16:03 +0200
Message-ID<kb7apfFsbsfU2@mid.individual.net>
In reply to#1380
Am 30.04.2023 um 07:31 schrieb peter....@gmail.com:
> RR> So maybe it's a problem with carriage return / line feed, i.e., the
> RR> lines are printed without line feed?
> 
> No, wouldn't you expect in this case the output "0 1 2 3 4 5"?
> The output is "5", as I wrote.
> 
As an assembler programmer of old, I used to feed printers and other 
output devices character by character. Sometimes ASCII and sometimes 
some fancy code.
ASCII code LF = 10 (decimal) is the 'line feed' control character.
The output device is expected to advance to the next line.
ASCII code CR = 13 (decimal) is the 'carriage return' control character.
The output device is expected to put the following characters at the 
first position of the same line.

I remember well the nice "wheeling around" when printing p, b, d, q 
cyclically on the screen, separated by CR. All characters showed up at 
the same place at the beginning of a line on the screen.

What a pity: I tried to replay this old joke, but in vain 🙁
Modern devices don't like a single CR and perform the LF action, too.
(Or, as in your case, they simply interpret CR as blank character.)

I'd love to see the trick again.

See https://en.wikipedia.org/wiki/Carriage_return
and https://en.wikipedia.org/wiki/Newline

Cheers,
Rainer

P.S. That didn't help you much, but I am quite certain that explained 
your experience.


[toc] | [prev] | [next] | [standalone]


#1390

Fromjfh <harperjf2@gmail.com>
Date2023-05-04 14:35 -0700
Message-ID<94a24ccc-d2ff-47ad-bc1c-14b6d8d525c7n@googlegroups.com>
In reply to#1383
On Monday, May 1, 2023 at 2:03:30 AM UTC+12, Rainer Rosenthal wrote:
> Am 30.04.2023 um 07:31 schrieb peter....@gmail.com: 
> > RR> So maybe it's a problem with carriage return / line feed, i.e., the 
> > RR> lines are printed without line feed? 
> > 
> > No, wouldn't you expect in this case the output "0 1 2 3 4 5"? 
> > The output is "5", as I wrote. 
> >
> As an assembler programmer of old, I used to feed printers and other 
> output devices character by character. Sometimes ASCII and sometimes 
> some fancy code. 
> ASCII code LF = 10 (decimal) is the 'line feed' control character. 
> The output device is expected to advance to the next line. 
> ASCII code CR = 13 (decimal) is the 'carriage return' control character. 
> The output device is expected to put the following characters at the 
> first position of the same line. 
> 
> I remember well the nice "wheeling around" when printing p, b, d, q 
> cyclically on the screen, separated by CR. All characters showed up at 
> the same place at the beginning of a line on the screen. 
> 
> What a pity: I tried to replay this old joke, but in vain 🙁 
> Modern devices don't like a single CR and perform the LF action, too. 
> (Or, as in your case, they simply interpret CR as blank character.) 
> 
> I'd love to see the trick again. 
> 
> See https://en.wikipedia.org/wiki/Carriage_return 
> and https://en.wikipedia.org/wiki/Newline 
> 
> Cheers, 
> Rainer 
> 
> P.S. That didn't help you much, but I am quite certain that explained 
> your experience.
I often hit this CR/LF problem (but not in Maple) because I use Linux but people who use Microsoft get emails from me that don't look like what I sent. I have never used Jupyter. Was the OP's problem with that or with Maple?

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.maple


csiph-web