How cai i encode url

2011-08-25 Thread John Smithury
Hi pythons. following is my code # -*- coding: utf8 -*- import urllib2 import urllib url = "http://a.shanting.mobi/百家讲坛/大国医/list"; print url p1=u"百家讲坛".encode('utf8') p2=u"大国医".encode('utf8') encodeurl = "http://a.shanting.mobi/"+p1+"/"+p2+"/"+"list"; print encodeurl mp3file = urllib2.urlopen(en

Where can i reference the "regular expressions"

2010-03-24 Thread John Smithury
Dear pythoners, I'm a new member to studay the python, i wan't to studay the "regular expressions" handle like below: ==source the is name ==source end= after convert, the result like below: -result {'t