Convert input IPython source into valid Python.
(self,source)
| 125 | _RANDOM_TEST = re.compile(r'#\s*all-random\s+') |
| 126 | |
| 127 | def ip2py(self,source): |
| 128 | """Convert input IPython source into valid Python.""" |
| 129 | block = _ip.input_transformer_manager.transform_cell(source) |
| 130 | if len(block.splitlines()) == 1: |
| 131 | return _ip.prefilter(block) |
| 132 | else: |
| 133 | return block |
| 134 | |
| 135 | def parse(self, string, name='<string>'): |
| 136 | """ |
no test coverage detected