This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients docs@python, eryksun, gaborjbernat, keller00, paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware
Date 2020-10-19.19:16:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1603135019.19.0.997571590865.issue42041@roundup.psfhosted.org>
In-reply-to
Content
Proposed alternative based on Eryk's:

      For maximum reliability, use a fully-qualified path for the executable.
      To search for an unqualified name on :envvar:`PATH`, use
      :meth:`shutil.which`. On all platforms, passing :data:`sys.executable`
      is the recommended way to launch the current Python interpreter again,
      and use the ``-m`` command-line format to launch an installed module.

      Resolving the path of *executable* (or the first item of *args*) is
      platform dependent. For POSIX, see :meth:`os.execvpe`, and note that
      when resolving or searching for the executable path, *cwd* overrides the
      current working directory and *env* can override the ``PATH``
      environment variable. For Windows, see the documentation of the
      ``lpApplicationName`` and ``lpCommandLine`` parameters of WinAPI
      ``CreateProcess``, and note that when resolving or searching for the
      executable path with ``shell=False``, *cwd* does not override the
      current working directory and *env* cannot override the ``PATH``
      environment variable. Using a full path avoids all of these variations.
History
Date User Action Args
2020-10-19 19:16:59steve.dowersetrecipients: + steve.dower, paul.moore, vinay.sajip, tim.golden, docs@python, zach.ware, eryksun, gaborjbernat, keller00
2020-10-19 19:16:59steve.dowersetmessageid: <1603135019.19.0.997571590865.issue42041@roundup.psfhosted.org>
2020-10-19 19:16:59steve.dowerlinkissue42041 messages
2020-10-19 19:16:59steve.dowercreate