Hello!
I'm using the wx.py.shell.Shell.
When I want to paste multi-line code, I've got problems with the indentation.
E.g. I have a file with the following content:
for n in range(2):
print n
print "End", n
When I copy & paste this, I get the following, which is obviously not
what I want:
for n in range(2):
... print n
... print "End", n
...
If I want to run the complete file, I can do so with exec on the open file.
But when I want to use the shell's runfile method on the open file, this
fails:
self.shell.runfile(r"J:\test.py")
for n in range(2):
... print n
... print "End", n
File "<input>", line 3
print "End", n
^
SyntaxError: invalid syntax
For interactive use it might make sense that I have to add an additional
empty line to trigger the execution, but for the described cases, I think
this is not the right behaviour.
I know that I can work around by having an empty line before the last line,
but this is not very nice.
Any hints? Is there a configuration option?
Regards,
Dietmar