Hello,

On Mon, 4 Jan 2021 21:07:23 +0400
Abdur-Rahmaan Janhangeer <[email protected]> wrote:

> @Christopher Barker <[email protected]>
> 
> You nailed it! I've used the conda activate command many times.
> It should in theory be possible in Python
> 
> @Chris Angelico <[email protected]>
> 
> Yes mere shell commands passing via Py does not work,
> maybe  a file way with results in current shell as @M.-A. Lemburg
> <[email protected]>
> points out, venv already generates the files. On windows it has an
> activate.bat

Knowing that, you're a step away from creating a "subshell" solution
for *yourself*. For POSIX systems, that would be:

venv-shell.sh:
----
. $1/bin/activate
/bins/sh
----

Voila!

If you want to add "--shell" switch to "python3 -m venv" with that
functionality, to benefit the whole mankind, not just yourself, I'm +1.
I'd say, you can start writing a patch for that. But I'd warn you that
it likely will be rejected, as it will require a bunch of sustained user
support (i.e. it won't work as expected on various OSes and various
shells).


-- 
Best regards,
 Paul                          mailto:[email protected]
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/75KT2J6ESWXZSTC2TEO2YNUX2FG3S4CR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to