prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  add -e/--executable to poetry env info to get the python executable path
  - [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.
  - [x] I have searched the [FAQ](https://python-poetry.org/docs/faq/) and general [documentation](https://python-poetry.org/docs/) and believe that my question is not already covered.
  
  ## Feature Request
  
  in addition to the already present `-p/--path` option, add a `-e/--execuatble` option to return the python executable path.
  
  My use case: I'm starting to use Taskfile and poetry on some projects; these project are developed on both linux and windows;
  
  I would like to avoid having to install tools such as mypy in the virtual environment, since they can be run from the outside (this also allows me to have faster CI, I have set up a custom docker image with all the tools needed).
  
  mypy in particular wants to know the exact path of the python executable to work (passed as `--python-executable` option), so having a new `poetry env info --executable` option that outputs the python path  would solve my issue in a cross-platform fashion.
  
  
  </issue>
  <code>
  [start of src/poetry/console/commands/env/info.py]
  1 from __future__ import annotations
  2 
  3 from typing import TYPE_CHECKING
  4 
  5 from cleo.helpers import option
  6 
  7 from poetry.console.commands.command import Command
  8 
  9 
  10 if TYPE_CHECKING:
  11     from poetry.utils.env import Env
  12 
  13 
  14 class EnvInfoCommand(Command):
  15     name = "env info"
  16     description = "Displays information about the current environment."
  17 
  18     options = [option("path", "p", "Only display the environment's path.")]
  19 
  20     def handle(self) -> int:
  21         from poetry.utils.env import EnvManager
  22 
  23         env = EnvManager(self.poetry).get()
  24 
  25         if self.option("path"):
  26             if not env.is_venv():
  27                 return 1
  28 
  29             self.line(str(env.path))
  30 
  31             return 0
  32 
  33         self._display_complete_info(env)
  34         return 0
  35 
  36     def _display_complete_info(self, env: Env) -> None:
  37         env_python_version = ".".join(str(s) for s in env.version_info[:3])
  38         self.line("")
  39         self.line("<b>Virtualenv</b>")
  40         listing = [
  41             f"<info>Python</info>:         <comment>{env_python_version}</>",
  42             f"<info>Implementation</info>: <comment>{env.python_implementation}</>",
  43             (
  44                 "<info>Path</info>:          "
  45                 f" <comment>{env.path if env.is_venv() else 'NA'}</>"
  46             ),
  47             (
  48                 "<info>Executable</info>:    "
  49                 f" <comment>{env.python if env.is_venv() else 'NA'}</>"
  50             ),
  51         ]
  52         if env.is_venv():
  53             listing.append(
  54                 "<info>Valid</info>:         "
  55                 f" <{'comment' if env.is_sane() else 'error'}>{env.is_sane()}</>"
  56             )
  57         self.line("\n".join(listing))
  58 
  59         self.line("")
  60 
  61         system_env = env.parent_env
  62         python = ".".join(str(v) for v in system_env.version_info[:3])
  63         self.line("<b>System</b>")
  64         self.line(
  65             "\n".join(
  66                 [
  67                     f"<info>Platform</info>:   <comment>{env.platform}</>",
  68                     f"<info>OS</info>:         <comment>{env.os}</>",
  69                     f"<info>Python</info>:     <comment>{python}</>",
  70                     f"<info>Path</info>:       <comment>{system_env.path}</>",
  71                     f"<info>Executable</info>: <comment>{system_env.python}</>",
  72                 ]
  73             )
  74         )
  75
  [end of src/poetry/console/commands/env/info.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/src/poetry/console/commands/env/info.py b/src/poetry/console/commands/env/info.py
  --- a/src/poetry/console/commands/env/info.py
  +++ b/src/poetry/console/commands/env/info.py
  @@ -15,7 +15,12 @@
       name = "env info"
       description = "Displays information about the current environment."
   
  -    options = [option("path", "p", "Only display the environment's path.")]
  +    options = [
  +        option("path", "p", "Only display the environment's path."),
  +        option(
  +            "executable", "e", "Only display the environment's python executable path."
  +        ),
  +    ]
   
       def handle(self) -> int:
           from poetry.utils.env import EnvManager
  @@ -30,6 +35,14 @@
   
               return 0
   
  +        if self.option("executable"):
  +            if not env.is_venv():
  +                return 1
  +
  +            self.line(str(env.python))
  +
  +            return 0
  +
           self._display_complete_info(env)
           return 0
  
verification_info: {"golden_diff": "diff --git a/src/poetry/console/commands/env/info.py b/src/poetry/console/commands/env/info.py\n--- a/src/poetry/console/commands/env/info.py\n+++ b/src/poetry/console/commands/env/info.py\n@@ -15,7 +15,12 @@\n     name = \"env info\"\n     description = \"Displays information about the current environment.\"\n \n-    options = [option(\"path\", \"p\", \"Only display the environment's path.\")]\n+    options = [\n+        option(\"path\", \"p\", \"Only display the environment's path.\"),\n+        option(\n+            \"executable\", \"e\", \"Only display the environment's python executable path.\"\n+        ),\n+    ]\n \n     def handle(self) -> int:\n         from poetry.utils.env import EnvManager\n@@ -30,6 +35,14 @@\n \n             return 0\n \n+        if self.option(\"executable\"):\n+            if not env.is_venv():\n+                return 1\n+\n+            self.line(str(env.python))\n+\n+            return 0\n+\n         self._display_complete_info(env)\n         return 0\n", "issue": "add -e/--executable to poetry env info to get the python executable path\n- [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.\r\n- [x] I have searched the [FAQ](https://python-poetry.org/docs/faq/) and general [documentation](https://python-poetry.org/docs/) and believe that my question is not already covered.\r\n\r\n## Feature Request\r\n\r\nin addition to the already present `-p/--path` option, add a `-e/--execuatble` option to return the python executable path.\r\n\r\nMy use case: I'm starting to use Taskfile and poetry on some projects; these project are developed on both linux and windows;\r\n\r\nI would like to avoid having to install tools such as mypy in the virtual environment, since they can be run from the outside (this also allows me to have faster CI, I have set up a custom docker image with all the tools needed).\r\n\r\nmypy in particular wants to know the exact path of the python executable to work (passed as `--python-executable` option), so having a new `poetry env info --executable` option that outputs the python path  would solve my issue in a cross-platform fashion.\r\n\n", "before_files": [{"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom cleo.helpers import option\n\nfrom poetry.console.commands.command import Command\n\n\nif TYPE_CHECKING:\n    from poetry.utils.env import Env\n\n\nclass EnvInfoCommand(Command):\n    name = \"env info\"\n    description = \"Displays information about the current environment.\"\n\n    options = [option(\"path\", \"p\", \"Only display the environment's path.\")]\n\n    def handle(self) -> int:\n        from poetry.utils.env import EnvManager\n\n        env = EnvManager(self.poetry).get()\n\n        if self.option(\"path\"):\n            if not env.is_venv():\n                return 1\n\n            self.line(str(env.path))\n\n            return 0\n\n        self._display_complete_info(env)\n        return 0\n\n    def _display_complete_info(self, env: Env) -> None:\n        env_python_version = \".\".join(str(s) for s in env.version_info[:3])\n        self.line(\"\")\n        self.line(\"<b>Virtualenv</b>\")\n        listing = [\n            f\"<info>Python</info>:         <comment>{env_python_version}</>\",\n            f\"<info>Implementation</info>: <comment>{env.python_implementation}</>\",\n            (\n                \"<info>Path</info>:          \"\n                f\" <comment>{env.path if env.is_venv() else 'NA'}</>\"\n            ),\n            (\n                \"<info>Executable</info>:    \"\n                f\" <comment>{env.python if env.is_venv() else 'NA'}</>\"\n            ),\n        ]\n        if env.is_venv():\n            listing.append(\n                \"<info>Valid</info>:         \"\n                f\" <{'comment' if env.is_sane() else 'error'}>{env.is_sane()}</>\"\n            )\n        self.line(\"\\n\".join(listing))\n\n        self.line(\"\")\n\n        system_env = env.parent_env\n        python = \".\".join(str(v) for v in system_env.version_info[:3])\n        self.line(\"<b>System</b>\")\n        self.line(\n            \"\\n\".join(\n                [\n                    f\"<info>Platform</info>:   <comment>{env.platform}</>\",\n                    f\"<info>OS</info>:         <comment>{env.os}</>\",\n                    f\"<info>Python</info>:     <comment>{python}</>\",\n                    f\"<info>Path</info>:       <comment>{system_env.path}</>\",\n                    f\"<info>Executable</info>: <comment>{system_env.python}</>\",\n                ]\n            )\n        )\n", "path": "src/poetry/console/commands/env/info.py"}]}