python Illegal instruction on AIX5.2

Posted by Charlie Epps on Stack Overflow See other posts from Stack Overflow or by Charlie Epps
Published on 2010-03-19T11:43:22Z Indexed on 2010/03/19 11:51 UTC
Read the original article Hit count: 323

Filed under:
|
|

hi,everyone: I run my python script functions like this: read from a text file, and store the data as dict. But when in the loop, an Illegal instruction occurs. why this happens? the psu-code is :

d={}
datafile=open('a.txt') # a big text file
for line in datafile:
    line=line.rstrip('\n')
    for token in line.split():
        print("Parsing line %d." % token[0])
        d[(int(token[0]))]=token[1:]

then the message is like this:

Parsing line 1.
Parsing line 2.
............
Parsing line 1065
Illegal instruction

what's the problem? my platform is python 2.6.2 on AIX 5.2. please help me, thanks!

© Stack Overflow or respective owner

Related posts about aix

Related posts about python