On Sat, 10 Mar 2012 15:48:48 +0100, Gelonida N wrote: > Hi, > > I want to know whether two .pyc files are identical. > > With identical I mean whether they contain the same byte code.
Define "identical" and "the same". If I compile these two files: # file ham.py x = 23 def func(): a = 23 return a + 19 # file = spam.py def func(): return 42 tmp = 19 x = 4 + tmp del tmp do you expect spam.pyc and ham.pyc to count as "the same"? -- Steven -- http://mail.python.org/mailman/listinfo/python-list