ReplSend sending with extra line space causing errors
Hi there, thanks for this plugin!
Is there a way to remove extra line when sending the code to the REPL?
For example:
mysum = 0
for i in range(5, 11, 2):
mysum += i
if mysum == 5:
break
print(mysum)
IndentationError: unexpected indent
This will throw an error due to the extra line space.
Thank you! Henry
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!