from PyQt4.QtCore import SIGNAL
import decimal
import httplib
import json
import threading

class Exchanger(threading.Thread):

    def __init__(self, parent):
        threading.Thread.__init__(self)
        self.daemon = True
        self.parent = parent
        self.quote_currencies = None
        self.lock = threading.Lock()
        # Do price discovery
        self.start()

    def exchange(self, btc_amount, quote_currency):
        with self.lock:
            if self.quote_currencies is None:
                return None
            quote_currencies = self.quote_currencies.copy()
        if quote_currency not in quote_currencies:
            return None
        return btc_amount * quote_currencies[quote_currency]

    def run(self):
        self.discovery()

    def discovery(self):
        connection = httplib.HTTPSConnection('intersango.com')
        connection.request("GET", "/api/ticker.php")
        response = connection.getresponse()
        if response.reason == httplib.responses[httplib.NOT_FOUND]:
            return
        response = json.loads(response.read())
        # 1 = BTC:GBP
        # 2 = BTC:EUR
        # 3 = BTC:USD
        # 4 = BTC:PLN
        quote_currencies = {}
        try:
            quote_currencies["GBP"] = self._lookup_rate(response, 1)
            quote_currencies["EUR"] = self._lookup_rate(response, 2)
            quote_currencies["USD"] = self._lookup_rate(response, 3)
            with self.lock:
                self.quote_currencies = quote_currencies
            self.parent.emit(SIGNAL("refresh_balance()"))
        except KeyError:
            pass

    def _lookup_rate(self, response, quote_id):
        return decimal.Decimal(response[str(quote_id)]["last"])

if __name__ == "__main__":
    exch = Exchanger(("EUR", "USD", "GBP"))
    print exch.exchange(1, "EUR")


@@ -841,22 +841,23 @@
 on('
-intersango.com
+blockchain.info
 ')%0A 
@@ -895,22 +895,14 @@
 , %22/
-api/
 ticker
-.php
 %22)%0A 
@@ -1082,96 +1082,8 @@
 ())%0A
-        # 1 = BTC:GBP%0A        # 2 = BTC:EUR%0A        # 3 = BTC:USD%0A        # 4 = BTC:PLN%0A
     
@@ -1187,17 +1187,21 @@
 sponse, 
-1
+%22GBP%22
 )%0A      
@@ -1264,9 +1264,13 @@
 se, 
-2
+%22EUR%22
 )%0A  
@@ -1337,9 +1337,13 @@
 se, 
-3
+%22USD%22
 )%0A  
@@ -1634,12 +1634,11 @@
 )%5D%5B%22
-last
+24h
 %22%5D)%0A

Use blockchain.info instead of intersango.com for exchange rates (quick hack)