tkf / emacs-ipython-notebook

IPython notebook client in Emacs
tkf.github.com/emacs-ipython-notebook/
GNU General Public License v3.0
548 stars 51 forks source link

Jupyter seems to only print out the last out of all cells #194

Open sirtosti opened 6 years ago

sirtosti commented 6 years ago

in this small python code , only the last result is output when use "Ctrl + enter" or cell-->"run all"

here is the little code:

"alphabetical".isupper() "alphabetical".islower() "alphabetical".istitle() "alphabetial".isdigit()

False -----So, this line is the output of "alphabetial".isdigit()" and it didn't execute the other three.

dzbee commented 6 years ago

This is typical notebook behavior. The others did execute, but the cell only prints the result of the last evaluation to console. If you put print statements in front of each line, all them will print.

sirtosti commented 6 years ago
Dylan, So since these things are Boolean, and according to you they executed. Why didn't the executed Boolean outputs printed? I am thinking that since they are Boolean results that they are automatically supposed to print without me explicitly calling them to print. Is my logic wrong? Sent from AOL Mobile Mail -----Original Message----- From: Dylan Bargteil To: tkf/emacs-ipython-notebook Cc: sirtosti ; Author Sent: Thu, Nov 30, 2017 04:07 PM Subject: Re: [tkf/emacs-ipython-notebook] Jupyter seems to only print out the last out of all cells (#194)

This is typical notebook behavior. The others did execute, but the cell only prints the result of the last evaluation to console. If you put print statements in front of each line, all them will print.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

dzbee commented 6 years ago

Jupyter/IPython will only print the result of the last evaluation in a cell to console unless explicitly told to print the result of an evaluation by the print command. It doesn't matter whether the expression is a Boolean or a complicated function. This is a general Jupyter/IPython behavior. As I said before, if you put print statements in front of each line, all of them will print. You could also split them into separate cells and all of them will print. I would highly suggest looking at a Jupyter notebook tutorial if you are confused about what's happening here.

sirtosti commented 6 years ago

Great help. Thank you!

Sent from AOL Mobile Mail

-----Original Message----- From: Dylan Bargteil notifications@github.com To: tkf/emacs-ipython-notebook emacs-ipython-notebook@noreply.github.com Cc: sirtosti bunkerway@aol.com; Author author@noreply.github.com Sent: Thu, Nov 30, 2017 09:46 PM Subject: Re: [tkf/emacs-ipython-notebook] Jupyter seems to only print out the last out of all cells (#194)

Jupyter/IPython will only print the result of the last evaluation in a cell to console unless explicitly told to print the result of an evaluation by the print command. It doesn't matter whether the expression is a Boolean or a complicated function. This is a general Jupyter/IPython behavior. As I said before, if you put print statements in front of each line, all of them will print. You could also split them into separate cells and all of them will print. I would highly suggest looking at a Jupyter notebook tutorial if you are confused about what's happening here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.