Brett Cannon on Nostr: Slightly odd question, but would people find it useful to have a function that ...
Slightly odd question, but would people find it useful to have a function that created a dict that you could `|` with `os.environ` to get the same environment changes that a virtual environment's activation script would do (sans prompt)?
I feel like I have been asked a couple of times now how to make `subprocess.run()` work like a virtual environment was activated, but I also feel like I might have temporal bias based on a question I got today.
Published at
2023-09-12 02:29:32Event JSON
{
"id": "260475f0aa28091c1edc787ff5eebefe251837956660f90e7163ebc69ef5ed9a",
"pubkey": "4b4002d3714d074cc31210e9e65088406e9f62154010da12c339d41b18b30f21",
"created_at": 1694478572,
"kind": 1,
"tags": [
[
"proxy",
"https://fosstodon.org/users/brettcannon/statuses/111049347710388613",
"activitypub"
]
],
"content": "Slightly odd question, but would people find it useful to have a function that created a dict that you could `|` with `os.environ` to get the same environment changes that a virtual environment's activation script would do (sans prompt)?\n\nI feel like I have been asked a couple of times now how to make `subprocess.run()` work like a virtual environment was activated, but I also feel like I might have temporal bias based on a question I got today.",
"sig": "717c2076f70ac0842500a0944af6fd6b38a247a525844baaf94649066bd25876a36b8e52ff5f4a1f2ad06edfd72928539b0aedcc2e455755b9c3dfecd6663d2d"
}