Python Module TemplateGenerator¶
- TemplateGenerator.check_skip(dest_file, file_list)[source]¶
Check if the time stamp make it necessary to regenerate the module. Regenerate if returning False, skip generating module for True.
Arguments
- dest_filestr
path to the module file. Function checks first if it exists and takes then the time stamp to compare it with the time stamps of the files in the list file_list.
- file_listlist of strings
The module is generated out of these template files. If any of those time stamps is newer that the dest_file, the module is regenerated.
- TemplateGenerator.build_module(modulename, mpi=True, dbg=True, imps=True, macacc=False, has_hdf5=True)[source]¶
- TemplateGenerator.render_subroutines(flnm, basedic)[source]¶
Build the subroutines from a base dictionary and the specifications inside the file. Functions returns string with subroutines and string with interfaces.