Re: Howto parse a string using a char in python

2013-02-15 Thread Gary Chambers
Steve, > I am looking for the python2.7 function(s) to parse a string from a colon > character ":" > > Sounds simple enough. > > For example, a string like "123456:789". I just need the "123456" > substring.(left of the :) How about: newstr = str[:str.find(':')] -- GC smime.p7s Descriptio

Re: logger doesn't roll over

2012-11-21 Thread Gary Chambers
Ron, LOGFILE, maxBytes=(1048576*10), backupCount=5 What am I doing wrong here, I don't get it. 10 * 1048576 = 10MB -- GC -- http://mail.python.org/mailman/listinfo/python-list

Re: Perl Hacker, Python Initiate

2011-02-02 Thread Gary Chambers
script is doing, or to be shown the Python way of how to accomplish something like that. Surprisingly, there's no mention of regular expressions in the Perl Phrasebook at http://wiki.python.org/moin/PerlPhrasebook. -- Gary Chambers -- http://mail.python.org/mailman/listinfo/python-list

Perl Hacker, Python Initiate

2011-02-01 Thread Gary Chambers
@{$cnames{$host}}); print " "; } print "$ip{$host}\n"; } exit 0; Will someone please provide some insight on how to accomplish that task in Python? I am unable to continually (i.e. it stops after displaying a single line) loop through the output while testing for the matches on the two regular expressions. Thank you. -- Gary Chambers -- http://mail.python.org/mailman/listinfo/python-list