I want to parse a log that has entries like this:
[2009-03-17 07:28:05.545476 -0500] rprt s=d2bpr80d6 m=2 mod=mail
cmd=msg module=access rule=x_dynamic_ip action=discard attachments=0
rcpts=1
routes=DL_UK_ALL,NOT_DL_UK_ALL,default_inbound,firewallsafe,mail01_mail02,spfsafe
size=4363 guid=291f0f108
I want to build a parser object that handles two different log file
formats. I have an object that handles Connection logs and an object
for Filter logs. Each will instantiate a Parser object, passing in
the path to individual log files.
There are a number of ways I could figure out whether I am
On Jan 1, 4:18 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Jan 2, 10:32 am, hubritic <[EMAIL PROTECTED]> wrote:
>
> > The data I have has a fixed number of characters per field, so I could
> > split it up that way, but wouldn't that defeat the purpose of usi
I am trying to parse data that looks like this:
IDENTIFIERTIMESTAMP T C RESOURCE_NAME DESCRIPTION
2BFA76F6 1208230607 T S SYSPROCSYSTEM
SHUTDOWN BY USER
A6D1BD62 1215230807 I
HFirmware Event
My problem is t
mmand, shell=True)
r.wait()
Sometimes the hardest part of python is to resist the urge to imagine
that things *must* be complicated and therefore the simpliest possible
solution can't possibly work ...
Daniel Klein wrote:
> On 27 Dec 2006 09:16:53 -0800, "hubritic" <[EMAIL P
I am trying to set off commands on Windows 2003 from python.
Specifically, I am trying to use diskpart with a script file (pointed
to with path).
cmd = ["diskpart", "/s", path]
p = Popen(cmd, shell=True)
The script is meant to loop through twice. It will do so if I commen
Agreed that the web sites are probably broken. Try running the HTML
though HTMLTidy (http://tidy.sourceforge.net/). Doing that has allowed
me to parse where I had problem such as yours.
I have also had luck with BeautifulSoup, which also includes a tidy
function in it.
Just Another Victim of t
I very much enjoyed this one! Good stuff.
Ron, it would help to have the code from your guest podcasts on your
site.
Thanks for your help in promoting python.
[EMAIL PROTECTED] wrote:
> Chris Hefele has done an excellent talk about programming with threads
> using Python, including a fair amount