src.elan.tcl

This module contains tcl parsing functions. These are badly documented here to speed up developing time.

TclScope is the main class that executes functions.

Notes: There are problems with the implementation of lists. At current, tcl lists are saved as python lists, but that sometimes gives errors. Since the most important parts of library work as expected, the implementation might stay like this.

Attributes

module_logger

Classes

TclScope

Functions

extend(liste, string)

Return element of the list that starts with this string.

Module Contents

src.elan.tcl.module_logger
src.elan.tcl.extend(liste, string)

Return element of the list that starts with this string.

class src.elan.tcl.TclScope(master=None, name='console', **var)
tcl_globals
_var
_global_list = []
name = 'console'
_procs
__parser
__return_value = None
_cmdlog = []
_log = []
_master = None
_subscopes = []
__execute(cmd, filename='')
Parameters:

cmd (src.elan.tclparser.TclCommand)

__substitute_variables(string, into_quotes=False)
Parameters:
  • string (str)

  • into_quotes (bool)

Return type:

str

__substitute_backslashes(string, which='')
Parameters:
  • string (str)

  • which (str)

Return type:

str

__substitute_commands(string, into_quotes=False)
Parameters:
  • string (str)

  • into_quotes (bool)

Return type:

str

__substitute(string, backslashes=True, variables=True, commands=True, into_quotes=False)
Parameters:
  • string (str)

  • backslashes (bool)

  • variables (str)

  • commands (str)

  • into_quotes (bool)

Return type:

str

substitute_expr(string)
Parameters:

string (str)

Return type:

str

__call__(s, name='')
py_getlog()
py_getcallings(callings, recursive=True)

Return the log for executing these commands

Parameters:
  • callings (list) – List of commands to include in the log

  • recursive (bool) – Include subscopes (statements in called functions)

Returns:

list of the words in the calling of the commands in callings

Return type:

list

py_get_procs()
py_getvar(name)
py_setvar(name, value)
append(args)
eval(args, name='')
expr(args)
exec(args)
forloop(args)
incr(args)
global_var(args)
iftest(args)
info(args)
lindex(args)
list(args)
llength(args)
proc(args)
puts(args)
returnval(args)
set(args)
source(args)
split(args)
string(args)
subst(*args)