generate function to use for notebook formatting
(self,
spacer=" ")
| 544 | return f |
| 545 | |
| 546 | def _get_notebook_display_formatter(self, |
| 547 | spacer=" "): |
| 548 | """ generate function to use for notebook formatting |
| 549 | """ |
| 550 | dirname_output_format = \ |
| 551 | self.result_html_prefix + "%s/" + self.result_html_suffix |
| 552 | fname_output_format = \ |
| 553 | self.result_html_prefix + spacer + self.html_link_str + self.result_html_suffix |
| 554 | fp_format = self.url_prefix + '%s/%s' |
| 555 | if sep == "\\": |
| 556 | # Working on a platform where the path separator is "\", so |
| 557 | # must convert these to "/" for generating a URI |
| 558 | def fp_cleaner(fp): |
| 559 | # Replace all occurrences of backslash ("\") with a forward |
| 560 | # slash ("/") - this is necessary on windows when a path is |
| 561 | # provided as input, but we must link to a URI |
| 562 | return fp.replace('\\','/') |
| 563 | else: |
| 564 | fp_cleaner = None |
| 565 | |
| 566 | return self._get_display_formatter(dirname_output_format, |
| 567 | fname_output_format, |
| 568 | fp_format, |
| 569 | fp_cleaner) |
| 570 | |
| 571 | def _get_terminal_display_formatter(self, |
| 572 | spacer=" "): |
no test coverage detected