| # Check that all ".pyc" files exist and are up-to-date |
| from stat import ST_MTIME |
| elif sys.argv[1] == '-s': |
| print 'Using MAGIC word', repr(MAGIC) |
| names = os.listdir(dirname) |
| print 'Cannot list directory', repr(dirname) |
| print 'Checking ', repr(dirname), '...' |
| name = os.path.join(dirname, name) |
| print 'Cannot stat', repr(name) |
| print 'Check', repr(name), '...' |
| print 'Cannot open', repr(name_c) |
| print 'Bad MAGIC word in ".pyc" file', |
| mtime = get_long(mtime_str) |
| if mtime == 0 or mtime == -1: |
| print 'Bad ".pyc" file', repr(name_c) |
| elif mtime <> st[ST_MTIME]: |
| print 'Out-of-date ".pyc" file', |
| return ord(s[0]) + (ord(s[1])<<8) + (ord(s[2])<<16) + (ord(s[3])<<24) |
| if __name__ == '__main__': |