nonse...@mynonsense.net wrote:
My python script calls another windows program file. I have the path
to that program hardcoded in it. Is there a way for python to
automatically find the path to this program?

testapp_path = "C:\\Program Files\\testapp\\version\\61\\"

Or do i have to do a brute force approach to searching all drives/
folders till it finds a path matching my program name?

The path to the Python script is given by __file__. If your other
program is in the same folder then you can use:

other_app_path = os.path.join(os.path.dirname(__file__), other_app_name)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to