Пример #1
0
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))
Пример #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)))
Пример #3
0
 def _bring_website(self, website):
     browser = utilities.default_browser_command()
     Popen(shlex.split(browser.replace('%1', website)))