a regual expression problem

2008-11-30 Thread lookon
I have a url of image, and I want to get the filename and extension of the image. How to write in python? for example, the url is http://a.b.com/aaa.jpg?version=1.1 how can I get aaa and jpg by python? -- http://mail.python.org/mailman/listinfo/python-list

How to detect Chinese in a string?

2008-10-12 Thread lookon
I have a string a(for example, a='中文Chinese'), and I want to know whether there are some Chinese in the string. Can someone tell me how to do it? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to detect Chinese in a string?

2008-10-12 Thread lookon
Get it. Thanks Peter Otten wrote: lookon wrote: I have a string a(for example, a='中文Chinese'), and I want to know whether there are some Chinese in the string. Can someone tell me how to do it? Thanks! See http://mail.python.org/pipermail/python-list/2008-September/509738.html

a regular expression problem

2008-10-10 Thread lookon
I want to use django to dispatch url. The url is like /test/Google/6,and my patten is r'^/test/(?Pq\b\W+ \b)/(?Ph\d+)$'. It works when the string is English(like Google), but fails when the string is in foreign language. Can anyone tell me the righ regular expression? Thank you! --

Re: How to calculate two time?

2008-10-09 Thread lookon
I have solved the problem. thank you On Oct 9, 7:20 pm, [EMAIL PROTECTED] wrote:     lookon Thank you for your help.It works.  However, I am using Google     lookon App Engine and cannot import dateutil and epsilon. I don't know how Google App Engine works, but are you not able to install

Re: How to calculate two time?

2008-10-09 Thread lookon
but can you tell me what format is it? in the str there is a float and I can not deal with it On Oct 9, 7:20 pm, [EMAIL PROTECTED] wrote:     lookon Thank you for your help.It works.  However, I am using Google     lookon App Engine and cannot import dateutil and epsilon. I don't know how

Re: How to calculate two time?

2008-10-09 Thread lookon
Thank you for your help.It works. However, I am using Google App Engine and cannot import dateutil and epsilon. Are there any other ways? On Oct 8, 10:06 pm, [EMAIL PROTECTED] wrote:     lookon I have two string like 2007-03-27T08:54:43+08:00 how do I get     lookon the hours between

How to calculate two time?

2008-10-08 Thread lookon
I have two string like 2007-03-27T08:54:43+08:00 how do I get the hours between these two time(string format)? -- http://mail.python.org/mailman/listinfo/python-list

How to install simplejson on WinXP

2008-07-21 Thread lookon
I am new to python and had difficulty in installing simplejson on WinXP...Could anyone help me? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: How to install simplejson on WinXP

2008-07-21 Thread lookon
I just installed again to see the error message. But it worked OK now. The problem was about compiling the c extension last time. Fredrik Lundh wrote: lookon wrote: I am new to python and had difficulty in installing simplejson on WinXP...Could anyone help me? Thanks what did you try