Module: Common Definitions (common)

Common definitions for FAdo files

Classes

Word

class Word(data=None, it=None)[source]

Class to implement generic words as iterables with pretty-print

Basically a unified way to deal with words with caracters of sizes different of one with no much fuss

Drawable

class Drawable[source]

Any FAdo object that is drawable

display(filename=None, size='30,20', strict=False, maxlblsz=6)[source]

Display automata using dot

Parameters
  • size – size of representation

  • fileName – filename to use for the graphic representation (default a os tmpfile

  • maxlblsz (int) – max size of labels before getting removed

  • strict (bool) – use limitations of label sizes

Changed in version 1.2.1.

abstract dotFormat(size='20,20', filename=None, direction='LR', strict=False, maxlblsz=6, sep='\n')[source]

Some dot representation

Parameters
  • size (str) – size parameter for dotviz

  • filename (str) – filename

  • direction (str) –

  • strict (bool) –

  • maxlblsz (int) –

  • sep (str) –

Returns: str:

dotLabel(lbl0)[source]

Label string

makePNG(filename=None, size='30,20')[source]

Produce png file to display

Parameters
  • filename (str) – file name, if None will be a tmpfile

  • size – size for graphviz

Returns

name of the file created

New in version 1.0.4.