Exemplo n.º 1
0
Arquivo: dev.py Projeto: pimp22/Caster
def launch_url(url):
    command = utilities.default_browser_command()
    if not command:
        threading.Thread(target=os.startfile, args=(url, )).start()
    else:
        path = command.replace('%1', url)
        Popen(shlex.split(path))
Exemplo n.º 2
0
def show_documentation(item):

    # to make it work with the offline version place in comments
    item = file_mapping[item]
    item = item[item.find("en\\cpp\\") + len("en\\cpp\\"):]
    website = "https://en.cppreference.com/w/cpp/" + item.replace(
        "\\", "/").replace(".html", "")

    # to make it work with the offline version remove comment
    # and make sure path to the local HTML book is correct
    # website = "file:///" + file_mapping[item]

    browser = utilities.default_browser_command()
    Popen(shlex.split(browser.replace('%1', website)))
Exemplo n.º 3
0
 def _bring_website(self, website):
     browser = utilities.default_browser_command()
     Popen(shlex.split(browser.replace('%1', website)))