os.get_exec_path() ignores BytesWarning instead of recoding them

Use only one global warning.catch_warnings() context, instead of two local
contexts. Improve also the explaination why the function uses a local import.
1 file changed