# psLib: Tools for working with PostScript data

exception fontTools.misc.psLib.PSTokenError

  Bases: `Exception`

exception fontTools.misc.psLib.PSError

  Bases: `Exception`

class fontTools.misc.psLib.PSTokenizer(buf=b'', encoding='ascii')

  Bases: `object`

  read(n=-1)

    Read at most ‘n’ bytes from the buffer, or less if the read hits EOF before obtaining ‘n’ bytes. If ‘n’ is negative or omitted, read all data until EOF is reached.

  close()
  getnexttoken(len=<built-in function len>, ps_special=b'()<>[]{}%', stringmatch=<built-in method match of re.Pattern object>, hexstringmatch=<built-in method match of re.Pattern object>, commentmatch=<built-in method match of re.Pattern object>, endmatch=<built-in method match of re.Pattern object>)
  skipwhite(whitematch=<built-in method match of re.Pattern object>)
  starteexec()
  stopeexec()

class fontTools.misc.psLib.PSInterpreter(encoding='ascii')

  Bases: `PSOperators`

  fillsystemdict()
  suckoperators(systemdict, klass)
  interpret(data, getattr=<built-in function getattr>)
  handle_object(object)
  call_procedure(proc)
  resolve_name(name)
  do_token(token, int=<class 'int'>, float=<class 'float'>, ps_name=<class 'fontTools.misc.psOperators.ps_name'>, ps_integer=<class 'fontTools.misc.psOperators.ps_integer'>, ps_real=<class 'fontTools.misc.psOperators.ps_real'>)
  do_comment(token)
  do_literal(token)
  do_string(token)
  do_hexstring(token)
  do_special(token)
  push(object)
  pop(*types)
  do_makearray()
  close()

    Remove circular references.

fontTools.misc.psLib.unpack_item(item)

fontTools.misc.psLib.suckfont(data, encoding='ascii')