Path (__file__) is the path to the current file. .parent gives you the directory the file is in. .absolute() gives you the full absolute path to ... ... <看更多>
Even cd project/path && $(poetry env info -p)/bin/python foo.py works ... get poetry to detect the virtualenv based on the current directory ... ... <看更多>