PyFlux in interactive modePython editor
Introduction
A programming language can be used:
- in interactive mode, directly in the Flux window (python editor)
- in script mode, via command files
Operation in interactive mode is presented in this paragraph. Operation in script mode is presented in § Command files .
Different zones
The Flux main window consists of several zones (graphic zone, data tree, etc.). The principal zones are presented in § Presentation of working environment .
The zones concerning the use of PyFlux in interactive mode are the zones presented in the figure below.
| Zone | Function |
|---|---|
| History | Result of executed PyFlux commands |
| PyFlux Command |
This area is composed by three parts:
|
« Echo » zone
This zone contains two log.py files is available (in read only):
- the “Flux[XX]_log.py” : all commands performed by the user during a session are recorded in this file.*
- the “Project_PyFlux_log.py” : all commands performed by the user during the beginning of the project up to the end of the project are recorded in this file.
|
|
«Editor python » zone
With python editor, user can read , write , run totally or only some selected command of the python script.
|
|
Notes :
- It is possible to open several py script file (one tab by file)
- This zone allows displaying automatically the groovy file when the user use subroutine in groovy language
- An editor python similar is available directly on the supervisor (script python context)
“Command prompt” zone
In this zone, the user can run and test a python command (or more python commands) directly, without create a new .py file. It's an operating direct mode, useful when you need to work quickly or debug your python command.
|
|
Example
You can enter a line of PyFlux / Python command directly into the Command zone, the answer is then displayed in the History zone.
An example of use of the Command zone as calculator is presented below.
| Command prompt zone | History zone | Echo zone |
|---|---|---|
|
|
|
Drag and drop
User can “Drag and drop” between different windows by selecting command with the mouse. It is equivalent to a copy + paste
Hide/display
User can hide or display one of these three zones in the PyFlux
command window by clicking on