'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
    if isinstance(f, file):
        self.code = marshal.load(f)
    else:
        self.code = marshal.loads(f.read())
