How to detect if a file is executable on Windows?

Igor Korot ikorot01 at gmail.com
Mon Feb 18 20:46:31 EST 2019


Hi,

On Tue, Feb 19, 2019 at 7:26 AM Stephane Wirtel <stephane at wirtel.be> wrote:
>
> Hi all,
>
> on Linux/Unix/BSD, we can detect if a file is an executable with
> os.access(path, os.X_OK) but this is not the case on Windows.
>
> Do you have an idea?

Check file extension?

Thank you.

>
> Have a nice day,
>
> Stéphane
>
> --
> Stéphane Wirtel - https://wirtel.be - @matrixise
> --
> https://mail.python.org/mailman/listinfo/python-list


More information about the Python-list mailing list