Hell Amit, > I have a binary file and i need to change the endian format..little to big as > well as vice versa..could anyone help me out. Warning: Not tested! #!/usr/bin/env python from sys import argv from array import array a = array("H", open(argv[1], "rb").read()) a.byteswap() open(argv[2], "wb").write(a.tostring()) HTH. Miki