[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to use a new buffer as Python shell?

From: edgar
Subject: How to use a new buffer as Python shell?
Date: Thu, 18 Aug 2022 15:40:17 +0000
User-agent: Roundcube Webmail/1.3.17


I know that "shell" can mean different things to new people. What I want is to have 2 (or n) Python buffers optionally linked to their respective 2 (or n) Python interpreters (1 for each).

Right now, if I create a new buffer with python-mode and do C-c C-p (which executes run-python) or C-c C-z (python-shell-switch-to-shell), all buffers are linked to one interpreter (in *Python* buffer).

What I would like is to have something like C-u C-c C-z or M-x run-new-python (bogus function name) and get a prompt with the name of the new buffer, where another interpreter is running, and which I can use to send lines of code from the buffer with python-mode (the one from which the command run-new-python was issued).

I have seen that Org (org-babel) is able to send to new interpreters, if the :session value is changed. I think that for what I have been looking is similar in a way (hopefully makes it clearer)

Is this possible? I've been running around in circles online. Can you please help me? Thanks!

"GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6) of 2022-04-28"

This free account was provided by - report spam to

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]