Description
Currently, the way pyside6-project invoking pyside6-uic and other tools is using subprocess. This will not work if the user does not install PySide6 in global site-packages. A workaround for user is to enter the venv before run pyside6-project.
I think we can replace the command with the Python function. So, the user only need to specify the correct Python interpreter with PySide6 installed. Namely,
# instead of using subprocess.call(['pyside6-uic', *args]) from PySide6.scripts.pyside_tool import uic sys.argv = # update argv accordingly uic()
In this way, the user do not need to care what is the current shell environment (global, in venv or in Poetry) to execute the command. Also, it would be much easier for editor extension development as the extension only needs to specify the correct Python interpreter without any knowledge about shell environment. (e.g. https://marketplace.visualstudio.com/items?itemName=seanwu.vscode-qt-for-python)