MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _writeFile

Function _writeFile

SLiCAP/SLiCAPhtml.py:160–177  ·  view source on GitHub ↗

Writes a text string to a file. :param fileName: Name of the file :type fileName: str :param txt: Text to be written to the file. :type txt: str

(fileName, txt)

Source from the content-addressed store, hash-verified

158 return txt
159
160def _writeFile(fileName, txt):
161 """
162 Writes a text string to a file.
163
164 :param fileName: Name of the file
165 :type fileName: str
166
167 :param txt: Text to be written to the file.
168 :type txt: str
169 """
170 f = open(fileName, 'w')
171 f.write(txt)
172 f.close()
173 # Update project configuration file. In this way the HTML info is preserved
174 # with next import of SLiCAP in the same project; it is only reset with
175 # initProject()
176 ini._update_project_config()
177 return
178
179### User Functions ###########################################################
180

Callers 3

_startHTMLFunction · 0.85
_insertHTMLFunction · 0.85
htmlPageFunction · 0.85

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected