def python_query(cmd, path):
    """Execute Python command using the Python interpreter located in *path*."""
    the_exe = get_python_executable(path)
    return exec_shell_cmd(f'"{the_exe}" -c "{cmd}"', path).splitlines()[0]
Execute Python command using the Python interpreter located in *path*.
winpython/utils.py