Using the Code Console and Terminal 

There are several ways to access JupyterLab's Code Console. The easiest is using the + option in the Files view, as shown in the following screenshot:

Then, select the type of Code Console you want to start. The list of kernels you have enabled will be shown on the display. After selecting the Python console, you will see a screen similar to the one shown in the following screenshot:

There are a couple of features worth noting in the new screen display:

  • At the top, a standard header for the engine is selected—in this case, the Python prolog.
  • At the bottom, we have a new input area for entering code.
  • The middle area of the screen will be taken up by a running log of the Python code that is entered in the input area at the bottom.
If you are using more than one file, you can customize the size and position of the console.

If we enter some Python code in the input area and hit Shift+Enter, the output should display in the middle of the screen. Try entering the following script:

print("Hello from the Python Console in JupyterLab")

The code should appear in the console window, as shown in the following screenshot:

We can see the following in the running log:

  • The line of code we entered, with the next available line number
  • The output, if any, of the line of code being executed
  • The reset input area, awaiting our next code statement(s)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset