I would like to find inside python for what architecture a file (in my case .so) has been build.

I known that I can see this in the terminal with the 'file' command.

Example:
`file libstuff.so` gives as output:

```
libstuff.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=3cac824147a873a51c2862fea4e83cfed46c8d9, not stripped

```

I need this in my python script so I don't load the .so file if I running my program on a ARM aarch64 architecture.

I seem to be unable to find anything on this matter...
Is this not possible?