Advertisement
Guest User

Untitled

a guest
Mar 6th, 2011
68
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def doSearch(self):
  2.     link = self.url.text()
  3.     pat = re.compile('(.+)\\.(.+)')
  4.     patHttp = re.compile('^http://')
  5.     if pat.match(link) and not patHttp.match(link):
  6.         link = 'http://' + link
  7.     elif not pat.match(link):
  8.         link = 'http://www.google.com/search?q=' + link.replace(' ', '+')
  9.     self.web.load(QtCore.QUrl(link))
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement