convert_source_line

convert_source_line(source_line: str) str[source]

Transform jupyter magic commands to valid python code.

This utilizes nbconvert.filters.ipython2python.

Parameters:

source_line (str) – Single line of source code.

Returns:

Valid python code, as string, even if it was a jupyter magic line.

Return type:

str