Quando si utilizza python-mode
via python.el, avente uno shell Python per Python tampone è il valore predefinito.
Tuttavia, è possibile modificare questo comportamento predefinito se invece si desidera che più buffer Python condividano la stessa shell Python. Per fare ciò, dopo l'apertura del primo buffer Python, immettere:
M-x python-set-proc
... che è documentata:
Set the default value of `python-buffer' to correspond to this buffer.
If the current buffer has a local value of `python-buffer', set the
default (global) value to that. The associated Python process is the
one that gets input from C-c C-r et al when used in a buffer that
doesn't have a local value of `python-buffer'.
Poi, più tardi, se si vuole un nuovo buffer Python usi il proprio guscio, immettere:
M-x set-variable python-buffer [RET] nil [RET]
dopo questo modo e poi aprire un nuovo buffer pitone, una nuova shell Python sarà creato per quel buffer dopo aver inserito python-switch-to-python
o C-c C-z
.
semplice e dolce – hatmatrix