Is there a Python equivalent of Tcl's auto_execok?
Cameron Laird
claird at starbase.neosoft.com
Wed Dec 22 09:32:40 EST 1999
In article <83pf6u$q57$1 at nnrp1.deja.com>, <maytagrepairman at yahoo.com> wrote:
>
>
>Is there a Python equivalent of Tcl's auto_execok?
.
.
.
No, to the best of my knowledge. Pythoneers must
import os, string
for pth in string.split(os.environ['PATH']):
fnm = os.path.join(pth, exe)
if os.path.exists(fnm):
break
for themselves, I believe.
Credit Gordon McMillan for this coding.
--
Cameron Laird <claird at NeoSoft.com>
Business: http://www.Phaseit.net
Personal: http://starbase.neosoft.com/~claird/home.html
More information about the Python-list
mailing list