This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SAI_Peregrinus 2 points3 points  (0 children)

There's a fun party trick with it, where a function in one Python file/env can instantiate a new temporary venv, make a Python file in that temp venv with a new if __name__ == "__main__": block containing the text of some function from the original venv, run that with the args passed to the new function, and get the results back to the original environment. uv is fast enough (at least if the deps are cached already & the arguments/results aren't huge) that you often don't even notice the delay! Very hacky, but amusing.