class documentation

class DependencyList(object): (source)

View In Hierarchy

List of dependencies, with file recording support.

Note that the output file is not automatically closed. You have to explicitly call the close() method.

Method __init__ Initialize the dependency list, automatically setting the output file to output_file (see set_output()) and adding all supplied dependencies.
Method __repr__ Undocumented
Method add If the dependency filename has not already been added, append it to self.list and print it to self.file if self.file is not None.
Method close Close the output file.
Method set​_output Set the output file and clear the list of already added dependencies.
Instance Variable file Undocumented
Instance Variable list Undocumented
def __init__(self, output_file=None, dependencies=[]): (source)
Initialize the dependency list, automatically setting the output file to output_file (see set_output()) and adding all supplied dependencies.
def __repr__(self): (source)

Undocumented

def add(self, *filenames): (source)
If the dependency filename has not already been added, append it to self.list and print it to self.file if self.file is not None.
def close(self): (source)
Close the output file.
def set_output(self, output_file): (source)

Set the output file and clear the list of already added dependencies.

output_file must be a string. The specified file is immediately overwritten.

If output_file is '-', the output will be written to stdout. If it is None, no file output is done when calling add().

file = (source)

Undocumented

Undocumented