[issue45468] Add support for preloading a Python script

2021-10-14 Thread Gabriele N Tornetta
Gabriele N Tornetta added the comment: That's totally fine. My aim is to have something in place that would make preloading some code less clunky than what it is just now. -- ___ Python tracker

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Christian Heimes
Christian Heimes added the comment: We generally prefer to have only way way to accomplish a goal. If PEP 648 gets accepted then your proposal won't be accepted. In case the PEP is rejected, then your proposal may still be rejected or may require a new PEP. Preloading has some complicated

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Gabriele N Tornetta
Gabriele N Tornetta added the comment: @christian.heimes thanks for bringing PEP 648 to my attention. The solution proposed there would work for me, although it actually does a bit more with some extra complexity. Not a big issue though. @eric.smith I think that, as argued in PEP 648, pth

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Christian Heimes
Christian Heimes added the comment: There is also https://www.python.org/dev/peps/pep-0648/ -- nosy: +christian.heimes ___ Python tracker ___

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Eric V. Smith
Eric V. Smith added the comment: Can you accomplish what you want with .pth files? -- nosy: +eric.smith ___ Python tracker ___ ___

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Gabriele N Tornetta
Change by Gabriele N Tornetta : -- keywords: +patch pull_requests: +27235 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28946 ___ Python tracker

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Gabriele N Tornetta
New submission from Gabriele N Tornetta : I would like to propose adding support for preloading a Python script before executing a Python application. Potential design: A new environment variable (e.g. PY_PRELOAD, an allusion to LD_PRELOAD, or PYTHONPRELOAD to be more aligned with the