def __init__(self, sno, t):
     code=str(sno)
     if (t == 'a' or t == 'b'):
         self.dc = SinaDataCatcher()
         #self.name = self.dc.getname(code)
     else:
         self.dc = JisiluDataCatcher()
         self.netvalue = decimal.Decimal(self.dc.getvalue(code))
     self.code=code
class fund:
    name=''
    code=''
    parvalue=0
    netvalue=0
    dc=None
    def __init__(self, sno, t):
        code=str(sno)
        if (t == 'a' or t == 'b'):
            self.dc = SinaDataCatcher()
            #self.name = self.dc.getname(code)
        else:
            self.dc = JisiluDataCatcher()
            self.netvalue = decimal.Decimal(self.dc.getvalue(code))
        self.code=code
    def getvalue(self):
        value = self.dc.getvalue(self.code)
        if value.strip():
            return decimal.Decimal(value)
        return decimal.Decimal('1')