Matching horizontal white space

2008-09-12 Thread Magnus . Moraberg
multipleSpaces = re.compile(u'\\h+') importantTextString = '\n \n \n \t\t ' importantTextString = multipleSpaces.sub("M", importantTextString) I would have expected consecutive spaces and tabs to be replaced by M but nothing is being replaced. If I try the following, then I'm left only with M,

Re: Nested try...except

2008-04-02 Thread Magnus . Moraberg
On 2 Apr, 15:15, [EMAIL PROTECTED] wrote: > On 2 Apr, 15:12, [EMAIL PROTECTED] wrote: > > > > > On Apr 2, 3:06 pm, [EMAIL PROTECTED] wrote: > > > > Hi, > > > > I found the following code on the net - > > > > http://mail-archives.apache.org/mod_mbox/httpd-python-cvs/200509.mbox/[EMAIL > > > PROTECT

Re: Nested try...except

2008-04-02 Thread Magnus . Moraberg
On 2 Apr, 15:12, [EMAIL PROTECTED] wrote: > On Apr 2, 3:06 pm, [EMAIL PROTECTED] wrote: > > > > > Hi, > > > I found the following code on the net - > > > http://mail-archives.apache.org/mod_mbox/httpd-python-cvs/200509.mbox/[EMAIL > > PROTECTED] > > > def count(self): > > -db = sqlite.

Nested try...except

2008-04-02 Thread Magnus . Moraberg
Hi, I found the following code on the net - http://mail-archives.apache.org/mod_mbox/httpd-python-cvs/200509.mbox/[EMAIL PROTECTED] def count(self): -db = sqlite.connect(self.filename, isolation_level=ISOLATION_LEVEL) -try: -try: -cur