项目需要,别人的代码,觉得挺实用 放上来
#!/usr/bin/env python
infile = file("in.mp3","rb")outfile = file("out.txt","wb")
def main():
while 1:
c = infile.read(1)
if not c:
break
outfile.write(hex(ord(c)))
outfile.close()
infile.close()
if __name__ == '__main__':
main()