Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #27970

Extract Text Table From File

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From Huso <hussain.a.rasheed@gmail.com>
Newsgroups comp.lang.python
Subject Extract Text Table From File
Date Mon, 27 Aug 2012 02:53:06 -0700 (PDT)
Organization http://groups.google.com
Lines 20
Message-ID <481dc39d-1dee-4ebe-97d5-ccad659f8c74@googlegroups.com> (permalink)
NNTP-Posting-Host 203.104.27.53
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace posting.google.com 1346061290 14194 127.0.0.1 (27 Aug 2012 09:54:50 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Mon, 27 Aug 2012 09:54:50 +0000 (UTC)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=203.104.27.53; posting-account=vuMekgoAAADezamgmHLSt0QTIg6DFFy5
User-Agent G2/1.0
Xref csiph.com comp.lang.python:27970

Show key headers only | View raw


Hi,

I am trying to extract some text table data from a log file. I am trying different methods, but I don't seem to get anything to work. I am kind of new to python as well. Hence, appreciate if someone could help me out.

Below is just ONE block of the traffic i have in the log files. There will be more in them with different data.

ROUTES TRAFFIC RESULTS, LSR
TRG  MP   DATE   TIME
 37  17 120824   0000

R         TRAFF   NBIDS   CCONG   NDV  ANBLO   MHTIME  NBANSW
AABBCCO     6.4     204     0.0   115    1.0    113.4     144
AABBCCI     3.0     293           115    1.0     37.0     171
DDEEFFO     0.2       5     0.0    59    0.0    107.6       3
EEFFEEI     0.0       0            59    0.0      0.0       0
HHGGFFO     0.0       0     0.0    30    0.0      0.0       0
HHGGFFI     0.3      15            30    0.0     62.2       4
END

Thanks

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Extract Text Table From File Huso <hussain.a.rasheed@gmail.com> - 2012-08-27 02:53 -0700
  Re: Extract Text Table From File Laszlo Nagy <gandalf@shopzeus.com> - 2012-08-27 12:12 +0200
    Re: Extract Text Table From File Huso <hussain.a.rasheed@gmail.com> - 2012-08-27 03:34 -0700
    Re: Extract Text Table From File Huso <hussain.a.rasheed@gmail.com> - 2012-08-27 03:34 -0700
      Re: Extract Text Table From File Laszlo Nagy <gandalf@shopzeus.com> - 2012-08-27 13:07 +0200
    Re: Extract Text Table From File Huso <hussain.a.rasheed@gmail.com> - 2012-08-27 04:23 -0700
    Re: Extract Text Table From File Huso <hussain.a.rasheed@gmail.com> - 2012-08-27 04:23 -0700
      Re: Extract Text Table From File Laszlo Nagy <gandalf@shopzeus.com> - 2012-08-27 13:55 +0200
    Re: Extract Text Table From File Ramchandra Apte <maniandram01@gmail.com> - 2012-09-05 06:08 -0700
    Re: Extract Text Table From File Tim Chase <python.list@tim.thechases.com> - 2012-09-05 11:25 -0500
  Re: Extract Text Table From File Tim Chase <python.list@tim.thechases.com> - 2012-08-27 07:42 -0500

csiph-web