我使用“for 循环”来记录数组中多个文件的 IMEI 编号。
当但没有检测到 IMEI 时,for 循环停止指示 AttributeError:rint。
result = getattr(asarray(obj), method)(*args, **kwds)
AttributeError: rint
我用过这个方法:
for IMEI in file():
try:
detect the IMEI from the files()
Append them to the array()
exception AttributeError:
print 'File name'
pass
如果在文件中未检测到 IMEI,我想做的是跳过错误,然后继续循环在其他文件中查找 IMEI。
IMEI 是指 16 位字母数字代码。我将其用作“字符串”。
我处理了 3200 个“.dat”文件,以便在每个文件中查找这样的字母数字文本。每个 dat 文件中都有一些 HEX 数据。