Package doconce :: Module expand_newcommands
[hide private]
[frames] | no frames]

Module expand_newcommands

source code

Functions [hide private]
 
process_newcommand(line) source code
 
parse_newcommands(filename) source code
 
substitute(source, newcommands)
Expand all newcommands in the list 'newcommands' of (pattern, replacement) pairs.
source code
 
expand_newcommands(newcommands_files, source) source code
Variables [hide private]
  __package__ = 'doconce'
Function Details [hide private]

substitute(source, newcommands)

source code 

Expand all newcommands in the list 'newcommands' of (pattern, replacement) pairs. source can be a filename or just a string with text. If source is a filename, a backup file with extension .old~ is first made and then the original file is overwritten by the new text with expanded commands.