Defines utility functions for input/output.

readAbstractMethodsFromFile[source]

readAbstractMethodsFromFile(file:str)

Returns a list of AbstractMethods read from the given file. The file should have one AbstractMethod per line with tokens separated by spaces.

writeAbstractMethodsToFile[source]

writeAbstractMethodsToFile(file:str, abstractMethods:List[AbstractMethod])

Writes the given abstractMethods to the given file such that one AbstractMethod is written per line.

readCompoundOperationsFromFile[source]

readCompoundOperationsFromFile(file:str)

Returns a list of lists of CompoundOperations read from the given file. Each line in the file represents a list of CompoundOperations in machine string format, as in the file written by writeCompoundOperationsToFile. If a line is unable to be parsed into a list of CompoundOperations, then that list is instead represented by None. This is different from an empty list, which represents a line with no CompoundOperations.

writeCompoundOperationsToFile[source]

writeCompoundOperationsToFile(file:str, operations:List[List[CompoundOperation]], form:str='general')

Writes the given list of lists of CompoundOperations to the given file in the machine string form given by form (defaults to "general"). Each list of operations occupies one line.