Пример #1
0
    def __init__(self, index=0, path=None, icon_idx=0):

        self.index = index
        self.path = path
        self.dc_path = co.decode(path)
        self.folder, self.fn = os.path.split(path)
        #        self.fn = co.decode(self.fn)
        #        if os.name == "nt":
        #            self.fn = self.fn.decode("GB18030")

        self.title = None
        self.icon_idx = icon_idx
        self.content = ""
        self.is_selected = False

        self.read()
Пример #2
0
    def __init__(self, index=0, path=None, icon_idx=0):

        self.index = index
        self.path = path
        self.dc_path = co.decode(path)
        self.folder, self.fn = os.path.split(path)
        #        self.fn = co.decode(self.fn)
        #        if os.name == "nt":
        #            self.fn = self.fn.decode("GB18030")

        self.title = None
        self.icon_idx = icon_idx
        self.content = ""
        self.is_selected = False

        self.read()
Пример #3
0
    def __init__(self, index=0, path=None, icon_idx=0):

        self.index = index
        self.path = path
        self.dc_path = co.decode(path)
        self.folder, self.fn = os.path.split(path)
        #        self.fn = co.decode(self.fn)
        #        if os.name == "nt":
        #            self.fn = self.fn.decode("GB18030")

        self.title = None
        self.icon_idx = icon_idx
        self.content = ""
        self.is_selected = False

        self.url = None  # 如果是在线hosts方案,则此项不为空
        self.last_fetch_dt = None  # 如果是在线hosts方案,则此项为最后更新时间

        self.read()
Пример #4
0
    def __init__(self, index=0, path=None, icon_idx=0):

        self.index = index
        self.path = path
        self.dc_path = co.decode(path)
        self.folder, self.fn = os.path.split(path)
        #        self.fn = co.decode(self.fn)
        #        if os.name == "nt":
        #            self.fn = self.fn.decode("GB18030")

        self.title = None
        self.icon_idx = icon_idx
        self.content = ""
        self.is_selected = False

        self.url = None  # 如果是在线hosts方案,则此项不为空
        self.last_fetch_dt = None  # 如果是在线hosts方案,则此项为最后更新时间

        self.read()
Пример #5
0
    def tryToDecode(self, s):

        try:
            return co.decode(s)
        except Exception:
            return u"### 解码错误!###"
Пример #6
0
    def tryToDecode(self, s):

        try:
            return co.decode(s)
        except Exception:
            return u"### 解码错误!###"