xml.sax parsing elements with the same name

2010-01-11 Thread amadain
I have an event log with 100s of thousands of entries with logs of the form: event eventTimestamp=2009-12-18T08:22:49.035 uniqueId=1261124569.35725_PFS_1_1340035961 result value=Blocked/ filters filter code=338 type=Filter_Name diagnostic result

Re: xml.sax parsing elements with the same name

2010-01-11 Thread amadain
On Jan 11, 7:26 pm, John Bokma j...@castleamber.com wrote: amadain mfmdev...@gmail.com writes: I have an event log with 100s of thousands of entries with logs of the form: event eventTimestamp=2009-12-18T08:22:49.035 uniqueId=1261124569.35725_PFS_1_1340035961    result value=Blocked

Re: xml.sax parsing elements with the same name

2010-01-11 Thread amadain
On Jan 11, 9:03 pm, John Bokma j...@castleamber.com wrote: amadain mfmdev...@gmail.com writes: On Jan 11, 7:26 pm, John Bokma j...@castleamber.com wrote: amadain mfmdev...@gmail.com writes: event eventTimestamp=2009-12-18T08:22:49.035 uniqueId=1261124569.35725_PFS_1_1340035961

Re: urllib2.URLError: urlopen error unknown url type: 'http error using twill with python

2009-06-29 Thread amadain
On Jun 8, 12:58 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Mon, 08 Jun 2009 12:14:18 +0100, Mark Devine wrote: Hi I wonder if someone could point me in the right direction. I used the following code to access gmail but I got a          urllib2.URLError: urlopen

Re: pexpect regex help

2007-02-23 Thread amadain
On Feb 21, 11:15 pm, [EMAIL PROTECTED] wrote: On Feb 21, 6:13 pm, [EMAIL PROTECTED] wrote: I have apexpectscript to walk through a cisco terminal server and I was hoping to get some help with this regex because I really suck at it. This is the code: index =

Re: pexpect regex help

2007-02-23 Thread amadain
On Feb 23, 8:46 am, amadain [EMAIL PROTECTED] wrote: On Feb 21, 11:15 pm, [EMAIL PROTECTED] wrote: On Feb 21, 6:13 pm, [EMAIL PROTECTED] wrote: I have apexpectscript to walk through a cisco terminal server and I was hoping to get some help with this regex because I really suck

Re: pexpect regex help

2007-02-23 Thread amadain
On Feb 23, 8:53 am, amadain [EMAIL PROTECTED] wrote: On Feb 23, 8:46 am, amadain [EMAIL PROTECTED] wrote: On Feb 21, 11:15 pm, [EMAIL PROTECTED] wrote: On Feb 21, 6:13 pm, [EMAIL PROTECTED] wrote: I have apexpectscript to walk through a cisco terminal server and I was hoping

replacing substrings within strings

2007-02-14 Thread amadain
Hi I was wondering if there was a nicer way to swap the first 2 characters in a string with the 4th and 5th characters other than: darr=list(010203040506) aarr=darr[:2] barr=darr[4:6] darr[:2]=barr darr[4:6]=aarr result=.join(darr) The above code works fine but I was wondering if anybody had

Re: replacing substrings within strings

2007-02-14 Thread amadain
On Feb 14, 12:16 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: amadain wrote: Hi I was wondering if there was a nicer way to swap the first 2 characters in a string with the 4th and 5th characters other than: darr=list(010203040506) aarr=darr[:2] barr=darr[4:6] darr[:2]=barr darr

Re: replacing substrings within strings

2007-02-14 Thread amadain
Thanks all. I usually turn strings into arrays for processing. I was looking to see if that was the best way to do it from others that use python. No one else uses python in my company so its nice to get different points of view from other python users from lists like this. A --

multi processes

2007-02-14 Thread amadain
Hi Heres a poser. I want to start a program 4 times at exactly the same time (emulating 4 separate users starting up the same program). I am using pexpect to run the program from 4 separate locations accross the network. How do I start the programs running at exactly the same time? I want to time

Re: multi processes

2007-02-14 Thread amadain
On Feb 14, 3:32 pm, [EMAIL PROTECTED] wrote: On Feb 14, 7:53 am, amadain [EMAIL PROTECTED] wrote: Hi Heres a poser. I want to start a program 4 times at exactly the same time (emulating 4 separate users starting up the same program). I am using pexpect to run the program from 4 separate

Re: Getting to an SSH account over a HTTP proxy

2007-01-24 Thread amadain
use pexpect to set the prompt after the login. class Login(General): Class spawning an ssh expect instance def __init__(self, user, host, pwd, cfg_name=None, log=None): if cfg_name: self.testcell = test_config(cfg_name)