Source code for form.formlink

"""Routines for connections to FORM."""

import collections
import errno
import os
import select
import shlex
import subprocess
import sys

from .datapath import get_data_path
from .ioutil import PushbackReader, set_nonblock
from .six import string_types

if False:
    from typing import Any, IO, MutableSequence, Optional, Sequence, Tuple, Union, overload  # noqa: E501, F401
if True:
    def overload(f):  # type: ignore  # noqa: D103, F811
        return None





[docs]class FormError(RuntimeError): """FORM stopped by an error. This exception is raised when :meth:`read() <form.FormLink.read>` finds the FORM process stopped by some error. """