Advertisement
Guest User

Untitled

a guest
Mar 6th, 2011
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement