Places the netlist of the circuit file 'fileName' on the active HTML page. The file must be located in the ini.cir_path folder. :param fileName: Name of the netlist file :type fileName: str :param label: Label ID for this object. :type label: str :return:
(fileName, label='', labelText ='')
| 279 | return html |
| 280 | |
| 281 | def netlist2html(fileName, label='', labelText =''): |
| 282 | """ |
| 283 | Places the netlist of the circuit file 'fileName' on the active HTML page. |
| 284 | The file must be located in the ini.cir_path folder. |
| 285 | |
| 286 | :param fileName: Name of the netlist file |
| 287 | :type fileName: str |
| 288 | |
| 289 | :param label: Label ID for this object. |
| 290 | :type label: str |
| 291 | |
| 292 | :return: HTML string that will be placed on the page. |
| 293 | :rtype: str |
| 294 | """ |
| 295 | try: |
| 296 | label = _addLabel(label, fileName=fileName, caption=labelText, labelType="data") |
| 297 | netlist = _readFile(ini.cir_path + fileName) |
| 298 | html = '<h2>' + label + 'Netlist: ' + fileName + '</h2>\n<pre>' + netlist + '</pre>\n' |
| 299 | html = _insertHTML(ini.html_path + ini.html_page, html) |
| 300 | except: |
| 301 | print("Error: could not open netlist file: '{0}'.".format(fileName)) |
| 302 | html = '' |
| 303 | return html |
| 304 | |
| 305 | |
| 306 | def lib2html(fileName, label='', lib='user'): |
no test coverage detected