Package implementing the scripting interface.
Imported modules
|
|
import Preferences
from ScriptManager import *
import os
import sys
|
Functions
|
|
createScript
init
installScript
removeScript
runStartupScripts
|
|
createScript
|
createScript ( name, code )
Module function to create a new script.
Arguments
- name
- name for the script (string or QString)
- code
- the script code (string or QString)
Returns
a reference to the newly created script (ScriptAction)
|
|
init
|
init ( ui )
Module function to initialize the scripting engine.
Arguments
- ui
- reference to the UserInterface object
Returns
reference to the script manager object (ScriptManager)
|
|
installScript
|
installScript (
action,
menubar=None,
toolbar=None,
)
Module function to install a script.
Arguments
- action
- the script action to be installed (ScriptAction)
- menubar
- the menubar this script is to be added to (QMenuBar)
- toolbar
- the toolbar this script is to be added to (QToolBar)
|
|
removeScript
|
removeScript ( action )
Module function to remove a script.
Arguments
- action
- script action to be removed (ScriptAction)
|
|
runStartupScripts
|
runStartupScripts ( ui )
Public module function to run the startup scripts.
The startup script looked for have to be named "startup.py".
The global startup script is searched for in the eric3 installation directory.
The user startup script is searched for in the users config directory
(on Win32 it is _eric3, everywhere else it is .eric3) in the users home
directory. The startup scripts found are executed in the order global startup
the local startup. This gives the user the capability to overwrite global
startup actions.
Arguments
- ui
- reference to the UserInterface object
|