Python Console panel


You can use IronPython to operate CS+ and the debug tool by command input. You can also register a script with the project by simply displaying the sample script.

Figure A.1

Python Console Panel

 

The following items are explained here.

[How to open]

-

From the [View] menu, select [Python Console].

[Description of each area]

(1)

Tab selection area

Selecting the tab will switch between the type of information that is displayed in the content area.

Tab Name

Description

Console

Enter and run IronPython functions and control statements, and CS+ Python functions.

The results of function execution and errors are also displayed.

Sample Scripts

Displays a sample script that is executable in the Python console and was obtained from the Renesas Web site.

The script file is also registered with the project.

(2)

Content area

(a)

[Console] tab

Enter and run IronPython functions and control statements, and CS+ Python functions.

The results of function execution and errors are also displayed.

Use a print statement to display the result of IronPython functions.

(b)

[Sample Scripts] tab

Displays a sample script that is executable in the Python console and was obtained from the Renesas Web site.

The script file is also registered with the project.

[Toolbar]

(1)

[Console] tab

None

(2)

[Sample Scripts] tab

Button

Function

Refresh

Updates the contents of the sample script that is displayed in the content area.

Add to project

Downloads the script file of a sample script that is being displayed in the content area to the project folder and registers the file in the project tree of the active project.

[[File] menu (Python Console panel-dedicated items)]

(1)

[Console] tab

The following items are exclusive for [File] menu in the Python Console panel (other items are common to all the panels).

 

Save Python Console

Saves the content displayed in the current panel in the last text file (*.txt) to be saved.

Note that if this item is selected first after the program starts, then the behavior is the same as selecting [Save Python Console As...].

Save Python Console As...

Opens the Save As dialog box to save the contents currently displayed on this panel in the designated text file (*.txt).

(2)

[Sample Scripts] tab

None

[Context menu]

(1)

[Console] tab

The following items are exclusive for [File] menu in the Python Console panel (other items are common to all the panels).

 

Cut

Cuts the selected characters and copies them to the clip board.

Copy

Copies the selected characters to the clip board.

Paste

Inserts the contents of the clipboard into the caret position.

Select All

Selects all characters displayed on this panel.

Abort

Forces the currently running command to stop.

Clear

Clears all output results.

Python Initialize

Initializes Python.

Select Script File...

Opens the Select Script File dialog box to execute the selected Python script file.

(2)

[Sample Scripts] tab

None