Find Version of Binary File
问题 Does anyone know how I can find the version of a binary file that has been passed to my function? I got the following code from this page: def version(fpath): f = open(fpath, 'rb') s = f.read(1024) print s f.close() However, this does not give me any useful output similar to what the mentioned website shows. Edit : @BoazYaniv tells me that the file format plays in important part in this problem. This is a windows EXE file 回答1: We use this code to pull versions from one of our executables for