best way of testing a program exists before using it?
0 answers - 671 bytes -
[Nick Craig-Wood] | Tim Golden <tim.golden (AT) viacom-outdoor (DOT) co.ukwrote: | if os.path.isfile (filepath): | print filepath | | You might get a more accurate result using | | os.access(filepath, os.XK) | | instead of | | os.path.isfile(filepath) | | Which checks the file is executable Sadly, not under Win32, hence the shenanigans with the PATHEXT variable :) TJG This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk
Re: best way of testing a program exists before using it?