1 May
2007
1 May
'07
6:49 a.m.
On 4/30/07, Greg Ewing
JOSHUA ABRAHAM wrote:
I was hoping you guys would consider creating function in os.path or otherwise that would find the full path of a file when given only it's base name and nothing else.I have been made to understand that this is not currently possible.
Does os.path.abspath() do what you want?
If not, what exactly *do* you want?
probably: def find_in_path(filename): for path in os.environ['PATH'].split(os.pathsep): if os.path.exists(filename): return os.path.abspath(os.path.join(path, filename)) -Mike