python类open_new()的实例源码

mac_tray.py 文件源码 项目:MKFQ 作者: maojingios 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def config_(self, notification):
        host_port = config.get(["modules", "launcher", "control_port"], 8085)
        webbrowser.open_new("http://127.0.0.1:%s/" % host_port)
WebsiteGenerator.py 文件源码 项目:WPEAR 作者: stephenlienharrell 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def showWebsite(self):
    #webbrowser.open_new(self.landing_file)
    pass
kt_git.py 文件源码 项目:sublimeplugins 作者: ktuan89 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def run(self, edit):
        path = gitPath(self.view.window())
        current_path = self.view.file_name()
        if current_path is not None and current_path.startswith(path) and gitWebBlameUrl() is not None:
            remaining_path = current_path[len(path):]
            print(remaining_path,' ', current_path, ' ', path)
            link = gitWebBlameUrl().format(remaining_path)
            webbrowser.open_new(link)
k40_whisperer.py 文件源码 项目:K40-Whisperer 作者: jkramarz 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def menu_Help_Web(self):
        webbrowser.open_new(r"http://www.scorchworks.com/K40whisperer/k40whisperer.html")
application.py 文件源码 项目:Solfege 作者: RannyeriDev 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def handle_href(self, href):
        u = urlparse(href)
        if u.scheme:
            try:
                webbrowser.open_new(href)
            except Exception, e:
                solfege.win.display_error_message2(_("Error opening web browser"), str(e))

        else:
            solfege.win.display_docfile(u.path)
mainwin.py 文件源码 项目:Solfege 作者: RannyeriDev 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def show_bug_reports(self, *v):
        m = Gtk.Dialog(_("Question"), self, 0)
        m.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
        m.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK)
        vbox = Gtk.VBox()
        m.vbox.pack_start(vbox, False, False, 0)
        vbox.set_spacing(18)
        vbox.set_border_width(12)
        l = Gtk.Label(label=_("Please enter the email used when you submitted the bugs:"))
        vbox.pack_start(l, False, False, 0)
        self.g_email = Gtk.Entry()
        m.action_area.get_children()[0].grab_default()
        self.g_email.set_activates_default(True)
        vbox.pack_start(self.g_email, False, False, 0)
        m.show_all()
        ret = m.run()
        m.destroy()
        if ret == Gtk.ResponseType.OK:
            params = urllib.urlencode({
                    'pagename': 'SITS-Incoming/SearchBugs',
                    'q': 'SITS-Incoming/"Submitter: %s"' % utils.mangle_email(self.g_email.get_text().decode("utf-8")()),
                })
            try:
                webbrowser.open_new("http://www.solfege.org?%s" % params)
            except Exception, e:
                self.display_error_message2(_("Error opening web browser"), str(e))
docphp.py 文件源码 项目:docphp 作者: garveen 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def on_navigate(self, url):
        if re.search('^https?://', url):
            webbrowser.open_new(url)
            return True

        m = re.search('^(changeto|constant)\.(.*)', url)
        if m:
            if m.group(1) == 'changeto':
                symbol, content = getSymbolDescription(self.currentSymbol, m.group(2))
            else:
                self.view.run_command('docphp_insert', {"string": m.group(2)})
                self.view.hide_popup()

        elif url == 'history.back':
            symbol = self.history.pop()
            self.currentSymbol = symbol
        else:
            self.history.append(self.currentSymbol)
            symbol = url[:url.find('.html')]
            self.currentSymbol = symbol
        symbol, content = getSymbolDescription(symbol)

        if content == False:
            return False

        content = self.formatPopup(content, symbol=symbol, can_back=len(self.history) > 0)

        content = content[:65535]
        self.view.update_popup(content)
sleepWellAlarm.py 文件源码 项目:Beginners-Python-Examples 作者: AsciiKay 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def alarm(h,m,s):
    timeToSleep = h * 3600 + m * 60 + s
    sleepingTime = sleep(timeToSleep)
    playSound = webbrowser.open_new(random.choice(linksToSounds))

# Main code
timer.py 文件源码 项目:Beginners-Python-Examples 作者: AsciiKay 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def timer(minutes):
    a = 0
    while a != minutes: 
        time.sleep(59)
        a = a + 1
    print("<<<<<<Timed out>>>>>>")  
    # I have not used return cause it termites the function
    webbrowser.open_new("https://www.youtube.com/watch?v=SlZMVAydqaE")
core.py 文件源码 项目:auxi.0 作者: Ex-Mente 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def create_template(material, path, show=False):
        """
        Create a template csv file for a data set.

        :param material: the name of the material
        :param path: the path of the directory where the file must be written
        :param show: a boolean indicating whether the created file should be \
        displayed after creation
        """
        file_name = 'dataset-%s.csv' % material.lower()
        file_path = os.path.join(path, file_name)

        with open(file_path, 'w', newline='') as csvfile:
            writer = csv.writer(csvfile, delimiter=',',
                                quotechar='"', quoting=csv.QUOTE_MINIMAL)
            writer.writerow(['Name', material])
            writer.writerow(['Description', '<Add a data set description '
                                            'here.>'])
            writer.writerow(['Reference', '<Add a reference to the source of '
                                          'the data set here.>'])
            writer.writerow(['Temperature', '<parameter 1 name>',
                            '<parameter 2 name>', '<parameter 3 name>'])
            writer.writerow(['T', '<parameter 1 display symbol>',
                             '<parameter 2 display symbol>',
                             '<parameter 3 display symbol>'])
            writer.writerow(['K', '<parameter 1 units>',
                             '<parameter 2 units>', '<parameter 3 units>'])
            writer.writerow(['T', '<parameter 1 symbol>',
                             '<parameter 2 symbol>', '<parameter 3 symbol>'])
            for i in range(10):
                writer.writerow([100.0 + i*50, float(i), 10.0 + i, 100.0 + i])

        if show is True:
            webbrowser.open_new(file_path)
main.py 文件源码 项目:seu-jwc-catcher 作者: LeonidasCl 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def click_about(text):
    print("You clicked '%s'" % text)
    webbrowser.open_new(text)
main.py 文件源码 项目:seu-jwc-catcher 作者: LeonidasCl 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def check_table():
    global username
    dialog = Toplevel(root)
    dialog.geometry('240x100+360+300')
    dialog.title('?????')
    Label(dialog, text="??????????????16-17-2").pack()
    v = StringVar()
    Entry(dialog,textvariable=v).pack(pady=5)
    Button(dialog, text=' ???? ', command=lambda: webbrowser.open_new(r"http://xk.urp.seu.edu.cn/jw_s"
                                                                      r"ervice/service/stuCurriculum.action?queryStudentId=" + str(
        username) + "&queryAcademicYear=" + v.get())).pack(pady=5)
Coinome GUI.py 文件源码 项目:python-scripts 作者: TheKetan2 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def callback(event):
    webbrowser.open_new("http://www.github.com/theketan2")
manimouse_gui.py 文件源码 项目:Manimouse 作者: shivamkajale 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def OpenDoc():
    wb.open_new('https://drive.google.com/open?id=1Wi6vTs4UpHZIsDLA-S_BWiwHK9TuY-w4TFQfpT5UlFw')
    return 0
manimouse_gui.py 文件源码 项目:Manimouse 作者: shivamkajale 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def OpenCredits():
    wb.open_new('https://drive.google.com/open?id=0BzMlLgwt8GfyT0NmZjlUWFpQaVE')
    return 0
manimouse_gui.py 文件源码 项目:Manimouse 作者: shivamkajale 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def OpenHelp():
    wb.open_new('https://drive.google.com/open?id=0BzMlLgwt8GfyTW9tRnJTWUhWaUU')
    return 0
GUI.py 文件源码 项目:Manimouse 作者: shivamkajale 项目源码 文件源码 阅读 34 收藏 0 点赞 0 评论 0
def OpenDoc():
    wb.open_new('https://drive.google.com/open?id=1Wi6vTs4UpHZIsDLA-S_BWiwHK9TuY-w4TFQfpT5UlFw')
    return 0
GUI.py 文件源码 项目:Manimouse 作者: shivamkajale 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def OpenCredits():
    wb.open_new('https://drive.google.com/open?id=0BzMlLgwt8GfyT0NmZjlUWFpQaVE')
    return 0
f-engrave-162.py 文件源码 项目:f-engrave 作者: stephenhouser 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def menu_Help_Web(self):
        webbrowser.open_new(r"http://www.scorchworks.com/Fengrave/fengrave_doc.html")
f-engrave-158.py 文件源码 项目:f-engrave 作者: stephenhouser 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def menu_Help_Web(self):
        webbrowser.open_new(r"http://www.scorchworks.com/Fengrave/fengrave_doc.html")


问题


面经


文章

微信
公众号

扫码关注公众号