Convert input IPython source into valid Python.
(self,source)
| 382 | _EXTERNAL_IP = re.compile(r'#\s*ipdoctest:\s*EXTERNAL') |
| 383 | |
| 384 | def ip2py(self,source): |
| 385 | """Convert input IPython source into valid Python.""" |
| 386 | block = _ip.input_transformer_manager.transform_cell(source) |
| 387 | if len(block.splitlines()) == 1: |
| 388 | return _ip.prefilter(block) |
| 389 | else: |
| 390 | return block |
| 391 | |
| 392 | def parse(self, string, name='<string>'): |
| 393 | """ |
no test coverage detected