Feature Showcase - Using the Interactive Shell
(Komodo IDE only)
Press F12
(‘Command’+‘Esc’ on macOS) to switch between the Editor Pane and the interactive shell. This showcase uses the sample program preprocess.py
, described in the Python tutorial, located by default in install dir\Komodo x.x\samples\python_tutorials
.
Before you start: Configure the interactive shell preferences to load the Python shell by default.
The key bindings mentioned below are part of the default Windows/Linux key binding scheme. If you are using Komodo for macOS, click Help > List Key Bindings to view the equivalent macOS key bindings.
On line 67 of
preprocess.py
, select and copycontenttype
.
Press
F12
(‘Command’+‘Esc’ on macOS) to open the shell. Enterimport
and pressCtrl+V
to pastecontenttype
, and then press ‘Enter’ to load the module.
On the new line, enter
help (
, pressCtrl+V
again to pastecontenttype
. and add a period.Press
F12
(Command+Esc
on macOS) to switch back to the Editor Pane, and select and copygetContentType
on the same line ascontenttype
.Press
F12
(Command+Esc
on macOS) to switch back to the interactive shell. PressCtrl+V
to pastegetContentType
, then enter a closing parenthesis and press ‘Enter’.