的Psyco是日志输出是这样的:psyco抱怨不支持的操作码54,它是什么?
21:08:47.56 Logging started, 10/29/09 %%%%%%%%%%%%%%%%%%%%
21:08:47.56 unsupported opcode 54 at create_l0:124 % %
21:08:47.56 unsupported opcode 54 at create_lx:228 % %
有问题的线路
class File:
def __init__(self, path, header):
self.path = path
self.header = header
self.file = path + '/' + header.to_filename()
self.pfile = None
def add_entry(self, entry): # line 124
self.pfile.write(entry.to_binary())
def open(self):
self.pfile = open(self.file, 'wb')
self.pfile.write(self.header.to_binary())
def close(self):
self.pfile.close()
def write(self, data):
self.pfile.write(data)
下一个:
nat_file = File(target + '/' + name, nat_header)
nat_file.open()
# add first value
nat_file.add_entry(DataBlock(t, q, 0.0, 1, v))
# add all others
while True:
try:
t, v, q = f.next()
except StopIteration:
break
nat_file.add_entry(DataBlock(t, q, 0.0, 1, v))
nat_file.close() # line 228
我有点在亏损的问题可能是什么。有任何想法吗?
啊,这是一个更容易找出哪些操作码的方法...我通过'Python/Lib/opcode.py'挖掘找到'def_op('STORE_MAP',54)' – ephemient 2009-10-29 20:36:47
与这些信息我发现http: //thomas.apestaart.org/log/?p=927 所以问题很明显,STORE_MAP在Python 2.6中是新的,可能不被Psyco支持。我想我会尝试用python 2.5来运行我的程序,而不应该再发生这种情况。 – Mauli 2009-10-30 07:33:44