Converts another string based class to BabelString.
(self, s, style=None)
| 804 | # Babelstring |
| 805 | |
| 806 | def asBabelString(self, s, style=None): |
| 807 | """Converts another string based class to BabelString.""" |
| 808 | if isinstance(s, str): |
| 809 | # Creates a new string with default styles. |
| 810 | style = makeStyle(style=style) |
| 811 | bs = self.newString(s, style=style) |
| 812 | return bs |
| 813 | else: |
| 814 | raise PageBotFileFormatError('type is %s' % type(bs)) |
| 815 | |
| 816 | # ... |
| 817 |
no test coverage detected