Ticket #1634 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Searching for binaries in PATH environment variable

Reported by: FabriceRobin@bbs-one.fr Assigned to: madarche
Priority: P2 Milestone: CPS 3.4.1
Component: PortalTransforms Version: TRUNK
Severity: normal Keywords:
Cc:

Description

I suggest to enhance PortalTransforms? in order to search for binaries in the PATH variable instead of the static list '/bin', '/usr/bin' et '/usr/local/bin'.

The file libtransforms/utils.py must be modified from:

bin_search_path = [ '/bin', '/usr/bin', '/usr/local/bin', ]

to:

import os bin_search_path = os.environPATH?.split(':')

Regards, Fabrice Robin

Change History

05/04/06 11:11:53 changed by madarche

  • owner changed from trac to madarche.
  • priority changed from P1 to P2.
  • status changed from new to assigned.

05/16/06 13:48:51 changed by sfermigier

Fixed in [45616].

I still don't get the exception for Windows though:

    if sys.platform == 'win32':
        # Directory containing 'binary' should be in PATH
        # XXX: I don't get this remark - SF
        return binary

05/16/06 13:49:03 changed by sfermigier

  • status changed from assigned to closed.
  • resolution set to fixed.