Python Forum
How to programmatically stop a program in Jupyter Notebook?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to programmatically stop a program in Jupyter Notebook?
#12
I've coded in ksh for years. I know what you want. You have a long cell and want to play with just the first piece before you let the rest run, then after a bit of play, you want to "turn on" the rest of the cell... In ksh, you just put the word "exit" on a line by itself and it stops right there and you can play, then take it back out when you're ready to put the rest of the code back in. I also wanted to do this in Jupyter notebook, but couldn't find a command to act like exit in ksh. I think the best way to do this is to split and then later go back and merge your cell into two, then back into 1. Both can be found under the edit menu, not the cell menu, where you might expect to find them.

Never apologize for being new here! In about 2 weeks you'll be an expert with as easy as this stuff is now!

Jim
Mark17,

You could use the edit split to play with the top piece of your cell, then later edit/merge it back together. I did a log of ksh coding and used "exit" all the time this way. I agree that there should be a command like that for Python too. Maybe the interactive mode is the issue there.

jp21in
Reply


Messages In This Thread
RE: How to programmatically stop a program in Jupyter Notebook? - by jp21in - Feb-12-2023, 01:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Troubleshooting Jupyter Notebook installation with Python using pip and a venv Drone4four 0 95 Yesterday, 01:00 AM
Last Post: Drone4four
  how come i can't stop program Shi_Shi_Shi_Shi 4 713 Nov-16-2023, 06:20 PM
Last Post: deanhystad
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 1,315 Nov-15-2023, 06:56 PM
Last Post: jst
  Navigating file directories and paths inside Jupyter Notebook Mark17 5 877 Oct-29-2023, 12:40 PM
Last Post: Mark17
Question How create programmatically variables ? SpongeB0B 6 1,513 Aug-19-2023, 05:10 AM
Last Post: SpongeB0B
Thumbs Up Python 3 Jupyter notebook ternary plot data nicholas 0 1,024 Jan-21-2023, 05:01 PM
Last Post: nicholas
  Create Excel Line Chart Programmatically dee 3 1,265 Dec-30-2022, 08:44 PM
Last Post: dee
  Graphs from Jupyter notebook to word Scott 0 972 Nov-28-2022, 06:16 AM
Last Post: Scott
  Opening an empty Jupyter notebook in VSCODE Krischu 3 1,966 Mar-09-2022, 01:57 PM
Last Post: Larz60+
  How to do line continuation in Jupyter Notebook? Mark17 4 5,661 Sep-22-2021, 04:22 PM
Last Post: ibreeden

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020