Closed spyder-bot closed 9 years ago
From hannes.k...@gmail.com on 2010-10-27T14:07:07Z
Hi, I just started using this great editor and stubled over this bug too: when I try to execute a selected code-block which has intendations then the code gets not executed and the python shell complains about intendations.
I had a short look at the code ( spiderlib/widgets/editor.py , method __process_lines() to be precise) and I think the problem has something to do with line-separators: On my system the call to get_line_separator() returns '\n' but the line-separator actually present in the selected text is the unicode character 2029.
Manually setting the line-sepeartor like this
ls= u'\u2029'
at the beginning of the __process_lines() method makes this problem go away for me. I know thats not a very good fix of course, but I hope it might help in tracking down the source of the problem.
cheers :)
From pierre.raybaut on 2010-10-28T02:10:06Z
hannes.koller: could you please create another "Issue" with a test case for your problem (which I can't reproduce: your change in editor.py does nothing on the bug described by d.turaev) with the exact traceback from IPython.
From hannes.k...@gmail.com on 2010-10-29T13:33:46Z
Hi
thanks for your Feedback. I have opened a separate issue for my problem under https://code.google.com/p/spyderlib/issues/detail?id=432
From ccordoba12 on 2011-05-15T19:40:47Z
Labels: Cat-Console
From ccordoba12 on 2011-09-12T11:25:31Z
Status: Duplicate
Mergedinto: 660
From d.turaev@gmail.com on 2010-10-20T04:18:33Z
What steps will reproduce the problem?
Please provide any additional information below
. If this function is defined in a usual Ipython shell, the error happens if the "print "hello"" line is indented via spacebar; it does not happen if it is indented via the tab key. In the shell which is integrated into Spyder, this doesnt seem to be the case. No idea, whether it is relevant.
Executing selected parts of code by hitting a key is one of the most important features of Spyder for me. Some further ideas about this topic:
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=420