Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)

src/s/w/SwitchHosts-HEAD/src/libs/MainFrame.py   SwitchHosts(Download)
import Queue
import time
from Hosts import Hosts
from TaskbarIcon import TaskBarIcon
from BackThreads import BackThreads
            common_file.close()
 
        hosts = Hosts(path=common_host_file_path, is_common=True)
        self.addHosts(hosts)
 
        for fn in self.configs["hostses"]:
            path = os.path.join(self.hosts_path, fn)
            hosts = Hosts(path)
            if hosts.content:
                pass
    def getSystemHosts(self):
 
        path = self.sys_hosts_path
        if path:
            hosts = Hosts(path=path, title=lang.trans("origin_hosts"), is_origin=True)
            path = os.path.join(self.hosts_path, fn)
 
            hosts = Hosts(path, title=title, url=url if is_online else None)
            hosts.content = u"# %s" % title