Please don't top-post, it makes everything harder to read.

(Re-ordering to make sense...)

On Thu, 23 Dec 2010 18:05:39 -0000, macm <moura.ma...@gmail.com> wrote:
On Dec 23, 3:57 pm, Jon Clements <jon...@googlemail.com> wrote:

I would use urlparse.urlsplit, then split further, if required.

>>> urlsplit(url)

SplitResult(scheme='http', netloc='docs.python.org', path='/dev/
library/stdtypes.html', query='highlight=partition',
fragment='str.partition')

urlparse isnt a option.

Why not?

My reasult must be:

myList =
['http',':','//','docs','.','python','.','org','/','dev','/','library','/',
'stdtypes','.','html','?','highlight','=','partition','#','str','.','partition']

Deriving this from the output of urlparse isn't that hard. I'm slightly baffled as to why this is more useful, but that's your problem.

re module is slow.

Is it slow enough to be an issue?

Even I make a loop in urlparse.urlsplit I can lost specialMeaning
order.

If you mean what I think you mean, and you're relying on getting queries from browsers in a defined order, you are in for a world of pain.

Seen easy but best aproach will be recursive.

If speed is as important to you as you imply, I doubt it.

--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to