![]() |
Scribus
Open source desktop publishing at your fingertips
|
Classes | |
class | QtSRuntimeError |
class | RunThread |
class | RuntimeConfig |
Functions | |
def | qts_func_decorator (func) |
def | alert (msg_qsv) |
def | update_qs_namespace (engine, ns) |
def | newQScriptEngine () |
def | run_qtscript |
def | hash_source |
def | check_python (filename) |
def | run_python |
def | run_background (func, args) |
def | mark_keep () |
def | cleanup () |
def | run_filename |
Variables | |
tuple | runtime_config = RuntimeConfig() |
extension_namespace = __main__.__dict__ | |
qts_engine = None | |
list | threads = [] |
This runtime module contains everything about running Python and QtScript scripts inside Scribus. Look at run_filename for details.
def scripter_runtime.cleanup | ( | ) |
delete every child which is not marked as keep
def scripter_runtime.mark_keep | ( | ) |
mark every child of Scripter.collector to keep
def scripter_runtime.run_filename | ( | filename, | |
subroutine = None , |
|||
extension = False , |
|||
background = False |
|||
) |
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.