Slow Mac when sending input to lower python process

Update. This does not work for the ESS R-concession process on Mac, but of course I'm interested in Python.

Additional updates: it seems that the buffer is slow to evaluate newlines.

Whenever I evaluate (send text) to the lower buffer, it is very slow to send and render text in the lower buffer. You can literally see how he writes ... for each individual line. So, imagine that you have a 100-line function, which will take some time (note: the actual execution of the function is not a problem, just a line of writing to the buffer).

What would be the variable for this?

Try:

 def uselessfunction(): a = 1 a = 1 a = 1 a = 1 a = 1 a = 1 a = 1 

In the output buffer, it prints:

 >>> >>> >>> ... ... ... ... ... ... ... ... >>> 

which appears very slowly.

Another example:

(process-send-string PROCESS "\n\n\n\n")

also slow as well (comint-send-input) after some lines are written in the lower python shell.

It seems that in most cases this slows it down.

Please note that this does not apply to Ubuntu.

+6
source share
1 answer

In the end, I now avoid the problem using IPython instead of Python 2.7. It has a magic %paste command that helps me solve the problem.

+1
source

Source: https://habr.com/ru/post/976216/


All Articles