Python Shell

The Python Shell is the console where you can interact with the Python interpreter or run your Python programs. Quick paste of common Python keywords and functions is available as well as direct keypad entry and [a A #] character entry . The Shell prompt can be used to test one line of code pasted from the Editor. Multiple lines of code may also be entered and run at a Shell prompt >>>.

Shell cursor state indicator.

 

Shell reinitialize when a new
program is executed.

 

Useful tools for working in the Shell.
See details below.

Shell Cursor States

non-alpha

y ƒ if needed to toggle

 

ƒ alpha

 

ƒ again ALPHA

 

 

 

y ƒ

lock alpha

 

ƒ again

lock ALPHA

 

 

Python Shell shortcut keys and menus

Menus

Keypress

Description

[Fns…]

o

Select [Fns…] to access menus of commonly used functions, keywords, and operators. Also access selected contents of the math and random modules.

Note: y N is also helpful for quick paste.

[a A #]

p

Select [a A #] to access a character palette as an alternate way to enter many characters.

[Tools]

q

Select [Tools] to display the following menu items.

1: Rerun last program

Reruns last program which was executed in the Shell.

2: Run…

Displays a list of the Python programs available to run in Shell.

3: Paste from Editor

Pastes the last copied program line from the Editor to the Shell prompt.

4: Vars…

Displays the vars from the last program which ran. Does not display program defined vars from an imported program.

5: Clear Screen

Clears the Shell screen. Does not reinitialize a new Shell.

6: New Shell

Reinitialize a new Shell.

7: Go to Program Line…

Displays the Editor from the Shell with cursor on the specified program line.

8: Last Entry>>>
}

Displays up to the last 8 entries at the Shell prompt during a Shell session.

9: View History
y }
y

Scroll the Shell screen to view up to the last 60 lines of output in the Shell during a Shell session. After drawing to the Shell using ti_plotlib, ti_draw or ti_image, pressing [clear] will clear the drawing back to the Shell. The history will not be in display. Use [2nd] } and [2nd] to view the history if needed.

0: Tab Complete y [enter]

Displays the names of the variables and functions available for access in the current Shell session.

When a letter of an available variable or function is entered, press y [enter] to auto-complete the name if a match is available in the current Shell session.

A: from PROGRAM import *…

When first executed in a Shell session, PROGRAM will run and vars will only be viewable using Tab Complete.

When executed again in the same Shell session, the execution will appear as no execution.

This command can also be pasted from y N.

[Editor]

r

Select [Editor] to display the Editor with the last programs in Editor. If Editor is empty, you can display File Manager.

[Files]

s

Select [Files] to display the File Manager.

Note:

To break a running Python program, such as if a program is in a continuous loop, press É. Press [Tools] (q) > 6:New Shell as an alternate method to halt a running program.
When using ti_plotlib, ti_draw or ti_image modules to draw to the Shell, press [clear] to clear the draw and return to the Shell prompt at the top of the screen. To view the Shell history, use [2nd] } and [2nd] to view the history as needed.