Package bar :: Module defaults
[hide private]
[frames] | no frames]

Module defaults

The module provides global regular expressions.

Import Graph
Import Graph

Variables [hide private]
  __package__ = 'bar'
    Global regular expressions:
  re_number = '([0-9.-]+)'
Relavitely easy regexp for number should work in most cases.
  re_trd = {'matrix': re.compile(r'matrix\(([0-9\.-]+) +([0-9\.-...
Holds regular expressions for supproted transformations.
  re_path = [re.compile(r'([MLQT])([0-9\.-]+),([0-9\.-]+)'), re....
List of regular expresions for supported types of paths:
  re_PointsPair = re.compile(r'([0-9\.-]+),([0-9\.-]+)')
Regexp for pair of points (comma separated, without whitespaces, bracketless: dd,dd)
  re_CoronalCoord = re.compile(r'Bregma:([0-9\.-]+)')
  re_CoordinateMarker = re.compile(r'\(([0-9\.-]+),([0-9\.-]+)\)')
  re_fontsizepx = re.compile(r'([0-9]+)px')
Regexp for fontsize in pixels.
Variables Details [hide private]

re_number

Relavitely easy regexp for number should work in most cases.

More general regexp for anu kind of real number taken from http://books.google.pl/books?id=YEoiYr4H2A0C&printsec=frontcover&dq=Python+Scripting+for+Computational+Science page 334. appears not to work correctly.

re_number=r'([+\-]?(\d+(\.\d*)?|\d*\.\d+)([eE][+\-]?\d+)?)'

Value:
'([0-9.-]+)'

re_trd

Holds regular expressions for supproted transformations.

Value:
{'matrix': re.compile(r'matrix\(([0-9\.-]+) +([0-9\.-]+) +([0-9\.-]+) \
+([0-9\.-]+) +([0-9\.-]+) +([0-9\.-]+)\)\s*'),
 'scalex': re.compile(r'scale\(([0-9\.-]+)\)'),
 'scalexy': re.compile(r'scale\(([0-9\.-]+),([0-9\.-]+)\)'),
 'translate': re.compile(r'ranslate\(([0-9\.-]+),([0-9\.-]+)\)')}

re_path

List of regular expresions for supported types of paths:

  • M,L,Q,T
  • H,V
  • S,Q
  • C
  • Z

Attention: Unsupported path types: A

Value:
[re.compile(r'([MLQT])([0-9\.-]+),([0-9\.-]+)'),
 re.compile(r'([HV])([0-9\.-]+)'),
 re.compile(r'(SQ)([0-9\.-]+),([0-9\.-]+),([0-9\.-]+),([0-9\.-]+)'),
 re.compile(r'(C)([0-9\.-]+),([0-9\.-]+),([0-9\.-]+),([0-9\.-]+),([0-9\
\.-]+),([0-9\.-]+)'),
 re.compile(r'(Z)')]