'Loads bytecode from a file or file like object.'

def load_bytecode(self, f):

    magic = f.read(len(bc_magic))
    if (magic != bc_magic):
        self.reset()
        return
    checksum = pickle.load(f)
    if (self.checksum != checksum):
        self.reset()
        return
    try:
        self.code = marshal_load(f)
    except (EOFError, ValueError, TypeError):
        self.reset()
        return
