On Jul 15, 2019, at 22:45, Steve Barnes <gadgetst...@live.co.uk> wrote:
>
> Just out of interest there must be something like this in venv - how else can
> it decide what to include in the virtual environment as copies or links? That
> would give the platform specific list.
Doesn’t it just do whatever’s in the libpython directory?
I think the closest way to reproduce that behavior from inside is to look at
syslib.get_path('stdlib') and 'platstdlib', map those to sys.path entries, and
try to build an import loader for each file in those paths. Probably not
something you want to do at every “import stdlib”. Especially for
implementations like Brython, where import is a synchronous AJAX network call.
Also, venv surely has to include private modules, or the public ones wouldn’t
work. That might actually be the right decision, but people have already made
suggestions both ways, so presumably that’s something that needs to be
discussed and decided on usefulness grounds rather than forced on us by an
implementation technique.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/GNETUMDALTX5SAQIRP4KNNCTCSCN533O/
Code of Conduct: http://python.org/psf/codeofconduct/