Script scripterng_runtime
[hide private]
[frames] | no frames]

Module scripterng_runtime

source code

This runtime module contains everything about running Python and QtScript scripts inside Scribus.

Look at run_filename for details.

Classes [hide private]
  RuntimeConfig
  QtSRuntimeError
  RunThread
Functions [hide private]
 
qts_func_decorator(func) source code
 
alert(context, engine) source code
 
update_qs_namespace(engine, ns) source code
 
newQScriptEngine() source code
 
run_qtscript(filename, subroutine=None, extension=False) source code
 
hash_source(filename, source=None) source code
 
check_python(filename) source code
 
run_python(filename, subroutine=None, extension=False) source code
 
run_background(func, *args) source code
 
mark_keep()
mark every child of ScripterNG.collector to keep
source code
 
cleanup()
delete every child which is not marked as keep
source code
 
run_filename(filename, subroutine=None, extension=False, background=False)
Call this function to run a script and nothing else.
source code
Variables [hide private]
  runtime_config = RuntimeConfig()
  extension_namespace = {'__builtins__': <module '__builtin__' (...
  qts_engine = None
  threads = []
Function Details [hide private]

alert(context, engine)

source code 
Decorators:
  • @qts_func_decorator

run_filename(filename, subroutine=None, extension=False, background=False)

source code 

Call this function to run a script and nothing else. It will do everything for you, including garbage collection for QtScript (very simple implementation, see mark_keep and cleanup). Running as extension uses the __main__ namespace and does not delete objects after execution. Running in background as a thread is not much tested and should only be used for non-GUI scripts.


Variables Details [hide private]

extension_namespace

Value:
{'__builtins__': <module '__builtin__' (built-in)>,
 '__doc__': None,
 '__file__': '/usr/bin/epydoc',
 '__name__': '__main__',
 'cli': <function cli at 0x97e71ec>,
 'os': <module 'os' from '/usr/lib/python2.5/os.pyc'>,
 'sys': <module 'sys' (built-in)>}