<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Could someone please help me with this? Im really 
new to any kind of programming .If posible would you be<BR> able to answer 
in detail.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanx<BR> <BR> HERE IS WHAT I 
HAVE:<BR><BR> import re<BR> import 
string<BR><BR> secondsMatcher=re.compile("Connect time: (\d+) 
secs")<BR><BR> def getStuff(file):<BR>     closeline = 
0<BR>     errorcount = 0<BR>     
secondscount = 0<BR>     connectcount = 
0<BR>     data_outcount = 0<BR>     
data_incount = 0<BR>     ppplist = 
file.readlines()<BR><BR>     for line in 
ppplist:<BR><BR>       if 
string.find(line,"LayerUp") >= 
0:<BR>           print "found 
connect"<BR>           
connectline = 
string.split(line)<BR>           
connectcount = connectcount + 1<BR><BR>       elif 
string.find(line,"ERROR") >= 
0:<BR>           print "found 
error"<BR>           
errorcount = errorcount + 1<BR><BR>        
elif string.find(line,"Connect time") >= 
0:<BR>           print "found 
close"<BR>connectSecs=secondsMatcher.search(line).group(1)<BR>           
print "Connected 
for",connectSecs<BR>          
closeline = 
string.split(line)<BR>           
secondscount = secondscount + string.atoi(connectSecs)<BR><BR> def 
main():<BR>    f=open("C:/my 
documents/ppp.log","r")<BR>     
getStuff(f)<BR>     return None<BR><BR> if 
__name__=="__main__":<BR>     main()<BR><BR> THIS IS 
WHAT I NEED THE PROGRAM TO DO:<BR><BR> I want the program to read the 
attached ppp.log file and give me the<BR> following type of 
report:<BR><BR><BR> PPP Log file summary for 5 Jul 
2002<BR> -----------------------------------<BR> Jul  5 18:15:01 
Connected to internet (IP 155.239.150.146)<BR> Jul  5 18:18:08 Closed 
connection. ( Connect time: 197 secs: 5091 octets<BR>in,<BR> 1864 octets 
out )<BR> -----------------------------------<BR> Successful 
connections: 5<BR> Failed connections: 2<BR> Total time online: 456 
seconds Total data in: 66576 octets<BR> Total Data out: 66349 
octets<BR><BR>HERE IS part of the olg file seems noone wants to touch the 
Attachment(lol)<BR><BR>> Jul  5 18:00:00 maxigate newsyslog[87300]: 
logfile turned over<BR>Jul  5 18:15:00 maxigate ppp[34607]: tun0: Phase: 
Connected to local client.<BR>Jul  5 18:15:00 maxigate ppp[34607]: tun0: 
Command: /var/run/internet: quit<BR>Jul  5 18:15:00 maxigate ppp[34607]: 
tun0: Phase: /var/run/internet: Client<BR>connection dropped.<BR>Jul  5 
18:15:00 maxigate ppp[34607]: tun0: Phase: Connected to local 
client.<BR>Jul  5 18:15:00 maxigate ppp[34607]: tun0: Command: 
/var/run/internet: set<BR>timeout 180<BR>Jul  5 18:15:00 maxigate 
ppp[34607]: tun0: Command: /var/run/internet: dial<BR>Jul  5 18:15:00 
maxigate ppp[34607]: tun0: Phase: bundle: Establish<BR>Jul  5 18:15:00 
maxigate ppp[34607]: tun0: Phase: deflink: closed -> opening<BR>Jul  5 
18:15:00 maxigate ppp[34607]: tun0: Phase: deflink: Connected!<BR>Jul  5 
18:15:00 maxigate ppp[34607]: tun0: Phase: deflink: opening -> 
dial<BR>Jul  5 18:15:00 maxigate ppp[34607]: tun0: Chat: Phone: 
0860007249<BR>Jul  5 18:15:00 maxigate ppp[34607]: tun0: Chat: deflink: 
Dial attempt 1 of<BR>1<BR>Jul  5 18:15:00 maxigate ppp[34607]: tun0: Phase: 
/var/run/internet: Client<BR>connection closed.<BR>Jul  5 18:15:00 maxigate 
ppp[34607]: tun0: Chat: Send: AT^M<BR>Jul  5 18:15:00 maxigate ppp[34607]: 
tun0: Chat: Expect(5): OK<BR>Jul  5 18:15:00 maxigate ppp[34607]: tun0: 
Chat: Received: AT^M^M<BR>Jul  5 18:15:01 maxigate ppp[34607]: tun0: Chat: 
Received: OK^M<BR>Jul  5 18:15:01 maxigate ppp[34607]: tun0: Chat: Send: 
ATE1Q0^M<BR>Jul  5 18:15:01 maxigate ppp[34607]: tun0: Chat: Expect(5): 
OK<BR>Jul  5 18:15:01 maxigate ppp[34607]: tun0: Chat: Received: 
ATE1Q0^M^M<BR>Jul  5 18:15:01 maxigate ppp[34607]: tun0: Chat: Received: 
OK^M<BR>Jul  5 18:15:01 maxigate ppp[34607]: tun0: Chat: Send: 
ATx1DT0860007249^M<BR>Jul  5 18:15:03 maxigate ppp[34607]: tun0: Chat: 
Expect(40): CONNECT<BR>Jul  5 18:15:22 maxigate ppp[34607]: tun0: Chat: 
Received:<BR>ATx1DT0860007249^M^M<BR>Jul  5 18:15:22 maxigate ppp[34607]: 
tun0: Chat: Received: CONNECT<BR>33600/ARQ/V34/LAPM/V42BIS^M<BR>Jul  5 
18:15:22 maxigate ppp[34607]: tun0: Phase: deflink: dial -> 
carrier<BR>Jul  5 18:15:23 maxigate ppp[34607]: tun0: Phase: deflink: 
/dev/cuaa0: CD<BR>detected<BR>Jul  5 18:15:23 maxigate ppp[34607]: tun0: 
Phase: deflink: carrier -> login<BR>Jul  5 18:15:23 maxigate ppp[34607]: 
tun0: Phase: deflink: login -> lcp<BR>Jul  5 18:15:23 maxigate 
ppp[34607]: tun0: LCP: FSM: Using "deflink" as a<BR>transport<BR>Jul  5 
18:15:23 maxigate ppp[34607]: tun0: LCP: deflink: State change<BR>Initial --> 
Closed<BR>Jul  5 18:15:23 maxigate ppp[34607]: tun0: LCP: deflink: State 
change<BR>Closed --> Stopped<BR>Jul  5 18:15:24 maxigate ppp[34607]: 
tun0: LCP: deflink: LayerStart<BR>Jul  5 18:15:24 maxigate ppp[34607]: 
tun0: LCP: deflink: SendConfigReq(179)<BR>state = Stopped<BR>Jul  5 
18:15:24 maxigate ppp[34607]: tun0: LCP:  ACFCOMP[2]<BR>Jul  5 
18:15:24 maxigate ppp[34607]: tun0: LCP:  PROTOCOMP[2]<BR>Jul  5 
18:15:24 maxigate ppp[34607]: tun0: LCP:  ACCMAP[6] 0x00000000<BR>Jul  
5 18:15:24 maxigate ppp[34607]: tun0: LCP:  MRU[4] 1500<BR>Jul  5 
18:15:2<BR><BR><BR></DIV></FONT></BODY></HTML>