Kent Johnson escribió: > Adam Gomaa wrote: > >> I'm having trouble with this script. When I run it, it crashes IDLE... >> which is no fun. :( >> >> I'm running Ubuntu 6.06 w/ python 2.4 >> >> When I say crash, I mean really _crash_. IDLE stop responding, and I >> have to killall idle && killall python2.4 before I can restart it (cause >> python2.4 keeps the TCP port open, I'm assuming) >> >> A few notes: >> list.txt is a text file with 99 lines, each with three letters on it. >> In ./retrieves, I have 99 files of style [xyz].1.txt. (in addition to >> list.txt) These are retrieved HTML pages that have the HTML stripped >> (the actual script is part of a series of scripts to download and format >> my school's course catalog) >> It seems to crash on the final iteration of the second for loop, no >> matter what file it's on at that point (which I've changed by changing >> x&y in 'for each in filelist[x:y]:' to diffrent values), so I don't >> think it has anything to do with the actual files it's accessing. >> >> > It looks like for some reason there is a problem with printing > goodlist1. I can't think of why that would happen. (At first I thought, > maybe there are special chars in the data, but printing a list prints > the repr() of the list elements, so any special chars should be escaped. > I also suspected the length of goodlist1 but it sounds like you have > tried with a smaller subset of the data.) >
IDLE becomes **very** unresponsive when printing long lists/strings. Great doses of patience and a good processor usually let you live through (Idle uses 100%, you have to take out of view the long text to make it become responsive again). At least, this happens on Windows (maybe other platforms don't have this problem?). I get this a lot when working with long HTML. There must be something wrong in the way IDLE prints long strings... Ismael _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor