Possible Duplicate:
reading integers from binary file in python
I've read the solution to a similar problem here: convert a string of bytes into an int (python) but I'm not quite sure how to repurpose it for my needs.
I have a .bin file which is just a sequence of bytes. Every set of 4 bytes represents a 32-bit number. I am trying to use the struct module as described in that linked question to convert every set of 4 bytes to an integer and print them to a new file. How can I achieve this?
Thanks for the help.