Open henryoliver opened 4 years ago
It is because empty line is used to notify Python REPL where indented block finishes.
mysum = 0
for i in range(5, 11, 2):
mysum += i
if mysum == 5:
break
print(mysum)
would work.
It is not easy to fix this kind of behavior to work because, for example, simply removing all empty lines like below also doesn't work.
mysum = 0
for i in range(5, 11, 2):
mysum += i
if mysum == 5:
break
print(mysum)
It is related to Python's syntax (indentation-oriented blocks) and its REPL's behavior.
Thanks for answer @rhysd !
Last question, can the ReplAuto
watch for file changes and re-run the entire file?
Example:
watchmedo shell-command \
--patterns="*.py" \
--recursive \
--command='python "${watch_src_path}"' \
.
Thanks!
Hi there, thanks for this plugin!
Is there a way to remove extra line when sending the code to the REPL?
For example:
IndentationError: unexpected indent
This will throw an error due to the extra line space.
Thank you! Henry