Table of Contents

Class: ScriptManager | eric3/Scripting/ScriptManager.py
--- | ---

### Class implementing the script manager.

#### Signals

firstScriptAdded
  emitted after the first script was added
lastScriptDeleted
  emitted after the last script was deleted

Base Classes |
--- | ---
QObject

Methods |
--- | ---
__init__ addScript deleteScript executeAction executeScript getScriptName getScriptNames
| __init__

    __init__ (
            self,
            parent=None,
            g=None,
            l=None,
            *args,
            )

### Constructor

#### Arguments

parent
  parent of this scriptmanager (QObject)
g
  dictionary for global scope
l
  dictionary for local scope
*args
  arguments passed on to QObject

| addScript

    addScript (
            self,
            scriptName,
            scriptString,
            )

### Public method to add a new script.

#### Arguments

scriptName
  name of the script to be added (string or QString)
scriptString
  the script code (string or QString)

#### Returns

a ScriptAction object

| deleteScript

    deleteScript ( self,  scriptName )

### Public method to delete a script.

#### Arguments

scriptName
  name of the script to be deleted (string or QString)

Exceptions |
--- | ---
NoSuchScriptError( scriptName )

| executeAction

    executeAction ( self,  action )

### Prublic slot to execute a script action.

#### Arguments

action
  script action to be executed (ScriptAction)

| executeScript

    executeScript (
            self,
            scriptName,
            out=sys.stdout,
            err=sys.stderr,
            )

### Public method to execute a script.

#### Arguments

scriptName
  name of the script to be executed (string or QString)
out
  redirect for stdout
err
  redirect for stderr

#### Exceptions

NoSuchScriptError
  raised, if the named script cannot be found

Exceptions |
--- | ---
NoSuchScriptError( scriptName )

| getScriptName

    getScriptName ( self )

### Private method to select a script name from the list of scripts.

#### Returns

Tuple of script name and a flag, indicating, if the user pressed ok or canceled the operation. (QString, boolean)

| getScriptNames

    getScriptNames ( self )

### Public method to retrieve the names of all scripts.

#### Returns

list of all script names (list of strings)

Table of Contents

This document was automatically generated by HappyDoc version 2.1