Dave Long writes: > > The 'for line in sys.stdin.xreadlines()' loop alone takes .30/.15/.06 > > seconds. Once the split is done as well, the time becomes > > 1.07/1.03/.02 seconds, so about 0.8 seconds is spent splitting those > > lines into fields. If that time weren't there, this version would be > > roughly as fast as the awk version. > > Except that the awks I -pg'ed spent most of their time in reading > lines and splitting fields as well, so in that world they'd be faster > also.
Perhaps I should say "if reading and splitting lines were faster in Python, the gap wouldn't be nearly as large". > > > I have the problem that PPP at times doesn't completely come up... > > Does ip-up run in that case? I haven't had this problem myself. > > No, my bad. My script dials up, exchanges mail, and hangs up, so I > don't want it run any time the connection comes up, and invoke it > manually. Right --- that's why I wrote wfg, so I could easily and dynamically attach and detach responses to the PPP-coming-up event.