Changing Python code while a project is running
One of the benefits of using the Live Python block is that you can make changes to Python code while the project is running, without the need to recompile or redeploy.
Notes:
- When you save the Python script in the editor, changes you have made will take effect immediately. You must be sure the code will function correctly before you save.
- Saving the code in the editor does not save the code permanently in the project file. When you stop emulating or disconnect from a deployed project, the default settings must be saved, otherwise the changes to the Python code will be lost. If you are prompted to save the settings, select Yes. If you are not prompted, the settings will be saved automatically. The behavior is controlled by the save default settings options on the Advanced tab of the User Preferences dialog box.
- Python Scripting blocks do not support live code updates. This feature is only available for Live Python blocks.
To change Python code while a project is running
- Double-click the Live Python block to open it.
- Double-click the Edit button to open the Python source code editor.
- Edit the code in the editor window, and then save the file.