def __init__(self, file_, verbose=0): """Constructor. Args: file_ (str): path to output file verbose (int): print process data """ File.__init__(self, file_) _path = abs_path(file_) _area = get_area(_path) _hint = self.hint_fmt.format(area=_area) super(TTOutputFile, self).__init__(file_, hint=_hint, verbose=verbose)
def __init__(self, file_): """Constructor. Args: file_ (str): path to work file """ File.__init__(self, file_) # Get hint _path = abs_path(file_) _dcc = get_dcc(_path) _area = get_area(_path) _hint = self.hint_fmt.format(dcc=_dcc, area=_area) super(TTWork, self).__init__(file_, hint=_hint) self.ver_fmt = '{}/{}'.format( self.dir, self.filename.replace( '_v{:03d}'.format(self.version), '_v{:03d}'))