pymchelper.utils.mcscripter module¶
Tool for creating MC input files using user-specified tables and ranges.
2019 - Niels Bassler
-
class
pymchelper.utils.mcscripter.
Generator
(templ, cfg)[source]¶ Bases:
object
This generates and writes the output files based on the loaded template files and the config file.
-
static
lreplace
(s, f, r)[source]¶ Left adjusted replacement of string f with string r, in string s.
This function is implemented in order to fill in data in FORTRAN77 fields, which are tied to certain positions on the line, i.e. subsequent values may not be shifted.
Finds string f in string s and replaces it with string r, but left adjusted, retaining line length. If length of r is shorter than length of f, remaining chars will be space padded. If length of r is larger than length of f, then characters will be overwritten. A copy of s with the replacement is returned.
-
static
-
class
pymchelper.utils.mcscripter.
McFile
[source]¶ Bases:
object
General MC single file object. This will be used for the template files as well as the generated output files.