Am 22.09.16 um 07:12 schrieb Veek M:
I wanted to test this piece of code which is Kate (editor) on the cmd
line python >>> prompt:
2. Blank lines in my code within the editor are perfectly acceptable for
readability but they act as a block termination on cmd line. So if i
tex_matches = re.findall(r'(\\\w+{.+?})|(\\\w+)', msg)
for tex_word in tex_matches:
    repl = unicode_tex.tex_to_unicode_map.get(tex_word)

    if repl is None:

I get:
 IndentationError: unexpected indent

IPython has a %paste and %cpaste magic to deal with this and other problems. It won't resolve the tab issue. However, Python code in general (due to indentation) is not very friendly for pasting and interactive usage. Better write the code to a file, then (again from IPython) you can read this by %run



Reply via email to