fastest method

2012-06-20 Thread david.gar...@gmail.com
I am looking for the fastest way to parse a log file. currently I have this... Can I speed this up any? The script is written to be a generic log file parser so I can't rely on some predictable pattern. def check_data(data,keywords): #get rid of duplicates unique_list = list(set(data))

Re: fastest method

2012-06-20 Thread david.gar...@gmail.com
;Here is bof:%s" %bof mylist = f.readlines() On Wed, Jun 20, 2012 at 11:17 AM, david.gar...@gmail.com < david.gar...@gmail.com> wrote: > I am looking for the fastest way to parse a log file. > > > currently I have this... Can I speed this up any? The scri

Re: Web Server for Python

2013-12-16 Thread david.gar...@gmail.com
Hi Mura, apache is used as a proxy with python. You would fire up your python web app and put apache in front of it. Apache does come these days with wsgi https://code.google.com/p/modwsgi/ that can be added to apache as module, something like mod_wsgi can be used for your python web app. PHP is a

Re: gdb python core dump file : not in executable format: File format not

2014-04-14 Thread david.gar...@gmail.com
Does this help? http://plasmodic.github.io/ecto/ecto/usage/external/debugging.html http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsDebugging http://downloads.conceptive.be/downloads/camelot/doc/sphinx/build/advanced/debug.html http://forums.gentoo.org/viewtopic-p-7123814.html On

Re: What use with Python

2014-07-01 Thread david.gar...@gmail.com
How about Web python? https://wiki.python.org/moin/WebFrameworks PC can run linux. Perhaps a vagrant linux virtual host would be in order? http://www.vagrantup.com/ Or windoz https://www.python.org/download/windows David On Tue, Jul 1, 2014 at 3:56 PM, wrote: > Hi, > > I am new to Python. Week

classes and __iter__

2012-01-09 Thread david.gar...@gmail.com
Hello, I have a class and i return both a key list and dictionary from the class. Is it good form to do this? The print helo.__dict__ shows both the list and dictionary. >>> class Parse_Nagios_Header: ... def __init__(self): ... self.keylist = [] ... self.d = {} ...

Re: classes and __iter__

2012-01-09 Thread david.gar...@gmail.com
FICATION_NUMBER', 144: 'CMD_CHANGE_HOST_CHECK_TIMEPERIOD', 145: 'CMD_CHANGE_SVC_CHECK_TIMEPERIOD', 146: 'CMD_PROCESS_FILE', 147: 'CMD_CHANGE_CUSTOM_HOST_VAR', 148: 'CMD_CHANGE_CUSTOM_SVC_VAR', 149: 'CMD_CHANGE_CUSTOM_CONTACT_VAR', 150:

Re: classes and __iter__

2012-01-09 Thread david.gar...@gmail.com
Thanks Ian & Chris for the conversation... On Mon, Jan 9, 2012 at 4:15 PM, Chris Rebert wrote: > On Mon, Jan 9, 2012 at 3:30 PM, david.gar...@gmail.com > wrote: > > Chris, > > > > Both a list and dict are both iterable. I get a python dictionary > object of &g

Re: classes and __iter__

2012-01-09 Thread david.gar...@gmail.com
I see your meaning for __iter__ method.;) On Mon, Jan 9, 2012 at 4:57 PM, david.gar...@gmail.com < david.gar...@gmail.com> wrote: > Thanks Ian & Chris for the conversation... > > > > > On Mon, Jan 9, 2012 at 4:15 PM, Chris Rebert wrote: > >> On M

Re: classes and __iter__

2012-01-09 Thread david.gar...@gmail.com
*Here is a good tutorial: http://shutupandship.com/articles/iterators/index.html * On Mon, Jan 9, 2012 at 5:22 PM, david.gar...@gmail.com < david.gar...@gmail.com> wrote: > I see your meaning for __iter__ method.;) > > > On Mon, Jan 9, 2012 at 4:57 PM, david.gar...@gmail

Re: classes and __iter__

2012-01-09 Thread david.gar...@gmail.com
Many thanks mrabarnett for the code critic... On Mon, Jan 9, 2012 at 5:08 PM, MRAB wrote: > On 09/01/2012 22:51, david.gar...@gmail.com wrote: > >> Hello, >> >> I have a class and i return both a key list and dictionary from the >> class. Is it good form to do