Table of Contents

Class: ScriptAction | eric3/Scripting/ScriptManager.py
--- | ---
### Class implementing the script action. This class is subclassed from QAction to have the possibility to attach it to menus and toolbars. #### Signals activated signal emitted when this script action is activated #### Exceptions CompilationError raised, if script compilation fails ExecutionError raised, if script execution failed
Base Classes |
--- | ---
QAction
Methods |
--- | ---
__compile __init__ activated addTo execute remove removeFrom
| __compile
    __compile ( self,  code )
### Private method to compile the code string. #### Arguments code string containing the code (string) #### Exceptions CompilationError raised, if compilation fails #### Returns the compiled bytecode as a string
Exceptions |
--- | ---
CompilationError( e )
| __init__
    __init__ (
            self,
            code,
            *args,
            )
### Constructor #### Arguments code the script code (string or QString) *args arguments passed on to QAction
| activated
    activated ( self )
Private method connected to the QAction activated signal.
| addTo
    addTo ( self,  widget )
### Public method to add this action to a widget. Overloaded from QAction in order to keep a list of widgets we are added to. #### Arguments widget widget to add this action to (QWidget)
| execute
    execute (
            self,
            out,
            err,
            globals,
            locals,
            )
### Public method to execute this script. #### Arguments out redirect for sys.stdout err redirect for sys.stderr globals dictionary containing global scope locals dictionary containing local scope
Exceptions |
--- | ---
ExecutionError( e )
| remove
    remove ( self )
Public method to remove this action.
| removeFrom
    removeFrom ( self,  widget )
### Public method to remove this action from a widget. Overloaded from QAction in order to keep a list of widgets we are added to. #### Arguments widget widget to remove this action from (QWidget)

Table of Contents

This document was automatically generated by HappyDoc version 2.1