How do I go about checking whether privelege elevation is required to start a subprocess without trying first then failing?
I need to start a subprocess command from within python code. In some cases it works fine, in other cases it turns out that elevated priveleges are required; and on some windows systems this condition causes my program to freeze.
I would like to determine wether privelege escalation is required without attempting to first run the subprocess and catching / traping any error condition.
The process that causes the program to freeze is invoked with;
subprocess.call('path _ filename _ options',shell=False)
Written by Alex Martelli
Also this for people without pywin32.