heeelp

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Wed Sep 4 23:46:08 EDT 2002


First of all, Morne, you should NEVER EVER post to public
mailing lists in HTML format; or to newsgroups either.

Bad poster, no biscuit.

Second, don't hammer us.  You posted here at least twice,
and I read another poster stating you have posted this in
other newsgroups as well.

ALSO, you didn't indicate your Python version or your OS.
You MUST do this, for any but the most general questions.

Now that I've busted your chops, here's the answer to your
question (see attachment).  I'm not sure where your ppp.log
came from (i.e. what OS) so I guessed that a connection
where an IP was not assigned was an error.  If the criteria
for an error is different you might explain it.  Your code
is looking for a string of "ERROR" which did not appear in
your sample.

Here's what my code produced on my system:

----------------------------------------------------------------------------
--
Jul  5 18:45  Connected to Internet (IP 155.239.150.146 )
Jul  5 18:48  Closed connection, connect time = 197 secs
              (5091 octets in, 1864 octets out)
----------------------------------------------------------------------------
--
Successful Connections:        1
Failed Connections:            0
Total Time Online:           197 seconds
Total Data In:              5091 octets
Total Data Out:             1864 octets

Hope this helps.

Chris Gonnerman -- chris.gonnerman at newcenturycomputers.net
http://newcenturycomputers.net

> ----- Original Message -----
> From: Morne
>
> Could someone please help me with this?
> Im really new to any kind of programming
>
> If posible would you be
> able to answer in detail.
> Thanx
> morne
>
> is it wrong of me to send the ppp.log file to just anyone?
>
> HERE IS WHAT I HAVE:
>

--- code sample rudely hacked away here ---

>
> THIS IS WHAT I NEED THE PROGRAM TO DO:
>
> I want the program to read the attached ppp.log file and give me the
> following type of report:
>
>
> PPP Log file summary for 5 Jul 2002
> -----------------------------------
> Jul  5 18:15:01 Connected to internet (IP 155.239.150.146)
> Jul  5 18:18:08 Closed connection. ( Connect time: 197 secs: 5091 octets
in,
> 1864 octets out )
> -----------------------------------
> Successful connections: 5
> Failed connections: 2
> Total time online: 456 seconds
> Total data in: 66576 octets
> Total Data out: 66349 octets


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: logproc.py
URL: <http://mail.python.org/pipermail/python-list/attachments/20020904/90b16e37/attachment.ksh>


More information about the Python-list mailing list