Re: Using re to find unicode ranges

2008-09-29 Thread Eric Abrahamsen
On Sep 29, 11:03 pm, "Mark Tolonen" <[EMAIL PROTECTED]> wrote: > "Eric Abrahamsen" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > Is it possible to use the re module to find runs of characters within a > > certain Uni

Using re to find unicode ranges

2008-09-29 Thread Eric Abrahamsen
Is it possible to use the re module to find runs of characters within a certain Unicode range? I'm writing a Markdown extension to go over text and wrap blocks of consecutive Chinese characters in tags for nice styling in an HTML page. The available hooks appear to be a pre- processor (wh

Re: ??????urllib post????????????

2007-09-05 Thread Eric Abrahamsen
It's in Chinese, so ASCII is no go. If anyone's interested in answering his question (he's trying to download a linked file using the post method from urllib tools, not something I know about) I can translate it, and pass the answer back to him once there's some kind of consensus. E On S

Re: for statement on empty iterable

2007-08-22 Thread Eric Abrahamsen
Here's another simple method: l = ['j', 'a', 'm', 'e', 's'] counter = 0 for i in l: # Do your code counter += 1 print counter Yrs, Eric > l = ['j', 'a', 'm', 'e', 's'] > > for i in l > # i want to know the nth number of times it has loop thru or > something like counter? > > Thanks