Python interpreter hangs

Rolf Wester wester at ilt.fhg.de
Mon Dec 4 04:48:03 EST 2000


Hi,

when I'm running the script that is listed below on one of our DEC-Alpha
stations,
python hangs after the print statement in the function test0. The output
"sum = 125000.0"
is printed on the screen but the print statement at the end of the
script is not executed.
The process is not idle but is running and demands 100% of CPU-time.
Python does not react on Ctr C, I have to explicitely kill it. Curiously
this script
works on a NT-PC, on another DEC-Alpha station and it already worked on
the same
machine it's now hanging. This is probably a problem with the DEC-Alpha
station but  I
don't have any idea what the reasons could be.
Did anybody have a similar problem or  does anybody have an idea
concerning my problem?
I would be very appreciative for any help.

--Rolf


import string

def test0():
 p  = []
 iz = []
 ix = []
 iy = []
 sum = 0.0
 nn = 125001
 heiz_dat0 = "12 23 33 1.0"
 for i in range(1,nn):
  zeile = string.split(heiz_dat0)
  iz.append(zeile[0])
  ix.append(zeile[1])
  iy.append(zeile[2])
  pf  = string.atof(zeile[3])
  sum = sum + pf
  p.append(pf)
 print "sum = ", sum
 return sum

sum1 = test0()
print "ende", sum1




More information about the Python-list mailing list