Python tkinter.messagebox.showinfo() Examples
The following are 30
code examples of tkinter.messagebox.showinfo().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
tkinter.messagebox
, or try the search function
.
Example #1
Source File: textarea.py From Tkinter-GUI-Programming-by-Example with MIT License | 7 votes |
def find(self, text_to_find): length = tk.IntVar() idx = self.search(text_to_find, self.find_search_starting_index, stopindex=tk.END, count=length) if idx: self.tag_remove('find_match', 1.0, tk.END) end = f'{idx}+{length.get()}c' self.tag_add('find_match', idx, end) self.see(idx) self.find_search_starting_index = end self.find_match_index = idx else: if self.find_match_index != 1.0: if msg.askyesno("No more results", "No further matches. Repeat from the beginning?"): self.find_search_starting_index = 1.0 self.find_match_index = None return self.find(text_to_find) else: msg.showinfo("No Matches", "No matching text found")
Example #2
Source File: sb3tosb2.py From sb3tosb2 with Mozilla Public License 2.0 | 6 votes |
def success(sb2path, warnings, gui): if gui: if warnings == 0: messagebox.showinfo("Success", "Completed with no warnings") elif warnings == 1: messagebox.showinfo("Success", "Completed with {} warning".format(warnings)) else: messagebox.showinfo("Success", "Completed with {} warnings".format(warnings)) else: print('') if warnings == 0: print("Saved to '{}' with no warnings".format(sb2path)) elif warnings == 1: print("Saved to '{}' with {} warning".format(sb2path, warnings)) else: print("Saved to '{}' with {} warnings".format(sb2path, warnings))
Example #3
Source File: textarea.py From Tkinter-GUI-Programming-by-Example with MIT License | 6 votes |
def find(self, text_to_find): length = tk.IntVar() idx = self.search(text_to_find, self.find_search_starting_index, stopindex=tk.END, count=length) if idx: self.tag_remove('find_match', 1.0, tk.END) end = f'{idx}+{length.get()}c' self.tag_add('find_match', idx, end) self.see(idx) self.find_search_starting_index = end self.find_match_index = idx else: if self.find_match_index != 1.0: if msg.askyesno("No more results", "No further matches. Repeat from the beginning?"): self.find_search_starting_index = 1.0 self.find_match_index = None return self.find(text_to_find) else: msg.showinfo("No Matches", "No matching text found")
Example #4
Source File: textarea.py From Tkinter-GUI-Programming-by-Example with MIT License | 6 votes |
def find(self, text_to_find): length = tk.IntVar() idx = self.search(text_to_find, self.find_search_starting_index, stopindex=tk.END, count=length) if idx: self.tag_remove('find_match', 1.0, tk.END) end = f'{idx}+{length.get()}c' self.tag_add('find_match', idx, end) self.see(idx) self.find_search_starting_index = end self.find_match_index = idx else: if self.find_match_index != 1.0: if msg.askyesno("No more results", "No further matches. Repeat from the beginning?"): self.find_search_starting_index = 1.0 self.find_match_index = None return self.find(text_to_find) else: msg.showinfo("No Matches", "No matching text found")
Example #5
Source File: decryptor_gui.py From nekros with BSD 3-Clause "New" or "Revised" License | 5 votes |
def decryptor(self): key = self.Entry1.get() if len(key) == 32: ask = messagebox.askyesno('ATTENTION : Are You Sure?', 'Is this Key Correct?\n\nDecryption From Invalid Key Just\nGoing to Destroy your Data!!') if ask == True: reverse = reverse_attack.Reverse(key) #Making object of Reverse Class reverse.start() #Starts Decryption Process messagebox.showinfo('Decryption Process Completed : )', 'Decryption/Recovery of File is Completed Successfully!') else: messagebox.showerror('Invalid Key', 'You Entered Invalid Decryption Key.\nDecrytion from Invalid Key Will,\nJust Destroy Whole Data : (')
Example #6
Source File: GUI_const_42_777_global.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def _msgBox(): msg.showinfo('Python Message Info Box', 'A Python GUI created using tkinter:\nThe year is 2017.') # Add another Menu to the Menu Bar and an item
Example #7
Source File: GUI_const_42_777_global_print.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def _msgBox(): msg.showinfo('Python Message Info Box', 'A Python GUI created using tkinter:\nThe year is 2017.') # Add another Menu to the Menu Bar and an item
Example #8
Source File: GUI_spinbox_small_bd.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def _msgBox(): msg.showinfo('Python Message Info Box', 'A Python GUI created using tkinter:\nThe year is 2017.') # Add another Menu to the Menu Bar and an item
Example #9
Source File: GUI_spinbox_small_bd_scrol.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def _msgBox(): msg.showinfo('Python Message Info Box', 'A Python GUI created using tkinter:\nThe year is 2017.') # Add another Menu to the Menu Bar and an item
Example #10
Source File: GUI_message_box.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def _msgBox(): msg.showinfo('Python Message Info Box', 'A Python GUI created using tkinter:\nThe year is 2017.') # Add another Menu to the Menu Bar and an item
Example #11
Source File: GUI_const_42_print.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def _msgBox(): msg.showinfo('Python Message Info Box', 'A Python GUI created using tkinter:\nThe year is 2017.') # Add another Menu to the Menu Bar and an item
Example #12
Source File: GUI_spinbox_two_sunken.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def _msgBox(): msg.showinfo('Python Message Info Box', 'A Python GUI created using tkinter:\nThe year is 2017.') # Add another Menu to the Menu Bar and an item
Example #13
Source File: GUI__init.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def clickMe(): from tkinter import messagebox messagebox.showinfo('Message Box', 'Hi from same Level.')
Example #14
Source File: MessageBox.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def clickMe(): messagebox.showinfo('Imported Message Box', 'Hi from Level 3')
Example #15
Source File: GUI_FallDown.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def clickMe(name, number): messagebox.showinfo('Information Message Box', 'Hello ' + name + \ ', your number is: ' + number) #=============================================================================== # Creating several controls in a loop #===============================================================================
Example #16
Source File: imagesmake.py From pythonprojects with MIT License | 5 votes |
def prepare(self, keywords): self.flag = True self.keywords = keywords self.base_url = 'http://image.baidu.com/search/flip?tn=baiduimage&ie=utf-8&word=' + self.keywords + '&pn=' path = "%s\\%s" % (os.path.abspath('.'), keywords) if not os.path.exists(path): os.mkdir(path) t = 0 self.cnt = 0 fail = 0 while True: if fail > 10: if self.flag: self.flag = False messagebox.showinfo("提示", "下载完成,但该词条下无足够数量图片!!!") return if (self.cnt >= int(self.num.get())): if self.flag: self.flag = False messagebox.showinfo("提示", "下载完成") return try: url = self.base_url + str(t) result = requests.get(url, timeout=10) pic_url = re.findall('"objURL":"(.*?)",', result.text, re.S) if len(pic_url) == 0: fail += 1 else: self.downloadPic(pic_url, path) except Exception as e: print(e) time.sleep(3) finally: t += 60 time.sleep(1) # print("图片下载完成")
Example #17
Source File: imagesmake.py From pythonprojects with MIT License | 5 votes |
def generate(self, ): if self.load: messagebox.showinfo("警告", "图片源加载尚未完成,请等待...") return if self.busy: messagebox.showinfo("警告", "上一个合成任务仍在进行中...") return try: self.busy = True width = int(self.column.get()) height = int(self.row.get()) length = int(self.width.get()) self.outim = self.orign.resize((width * length, height * length)) for i in range(height): for j in range(width): manager = ImageManager( im=self.outim.crop((i * length, j * length, (i + 1) * length, (j + 1) * length))) rgion = self.getMin(manager, self.resources) box = (i * length, j * length, (i + 1) * length, (j + 1) * length) self.outim.paste(rgion.resize((length, length)), box) self.saveImg() messagebox.showinfo("提示", "生成图片成功!!!") except Exception as e: messagebox.showinfo("提示", "生成图片失败,请重试...") print(e) finally: self.busy = False
Example #18
Source File: GUI_data_from_widget.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def _msgBox(): msg.showinfo('Python Message Info Box', 'A Python GUI created using tkinter:\nThe year is 2017.') # Add another Menu to the Menu Bar and an item
Example #19
Source File: GUI_const_42_print_func.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def _msgBox(): msg.showinfo('Python Message Info Box', 'A Python GUI created using tkinter:\nThe year is 2017.') # Add another Menu to the Menu Bar and an item
Example #20
Source File: GUI_canvas.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def _msgBox(): msg.showinfo('Python Message Info Box', 'A Python GUI created using tkinter:\nThe year is 2017.') # Add another Menu to the Menu Bar and an item
Example #21
Source File: GUI_const_42_777.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def _msgBox(): msg.showinfo('Python Message Info Box', 'A Python GUI created using tkinter:\nThe year is 2017.') # Add another Menu to the Menu Bar and an item
Example #22
Source File: Clean.py From OrganiseDesktop with MIT License | 5 votes |
def clean(self): checked_extensions = {} for x in folders: checked_extensions[x] = Extensions[x] organise_desktop(checked_extensions) tkMessageBox.showinfo('Complete', 'Desktop clean finished.')
Example #23
Source File: view.py From inbac with MIT License | 5 votes |
def show_about_dialog(self): messagebox.showinfo("About", "inbac " + inbac.__version__, parent=self.master)
Example #24
Source File: pyjsonviewer.py From PyJSONViewer with MIT License | 5 votes |
def show_info_window(): msg = """ PyJSONViewer by Atsushi Sakai(@Atsushi_twi) Ver.""" + VERSION + """\n """ messagebox.showinfo("About", msg)
Example #25
Source File: notification.py From Jarvis with MIT License | 5 votes |
def notify__GUI_FALLBACK(name, body, urgency=NOTIFY_NORMAL): def notify_implementation(): root = tk.Tk() root.after(GUI_FALLBACK_DISPLAY_TIME, root.destroy) root.withdraw() try: tkMessageBox.showinfo(str(name), str(body)) root.destroy() except tk.TclError: # Ignore! # Just close and destroy tkinter window pass Thread(target=notify_implementation).start()
Example #26
Source File: __init__.py From lackey with MIT License | 5 votes |
def popup(text, title="Lackey Info"): """ Creates an info dialog with the specified text. """ root = tk.Tk() root.withdraw() tkMessageBox.showinfo(title, text)
Example #27
Source File: views.py From Python-GUI-Programming-with-Tkinter with MIT License | 5 votes |
def show_about(self): """Show the about dialog""" about_message = 'ABQ Data Entry' about_detail = ( 'by Alan D Moore\n' 'For assistance please contact the author.' ) messagebox.showinfo(title='About', message=about_message, detail=about_detail) # new code for ch7
Example #28
Source File: application.py From Python-GUI-Programming-with-Tkinter with MIT License | 5 votes |
def check_queue(self, queue): if not queue.empty(): item = queue.get() if item.status == 'done': messagebox.showinfo( item.status, message=item.subject, detail=item.body ) self.status.set(item.subject) return elif item.status == 'error': messagebox.showerror( item.status, message=item.subject, detail=item.body ) self.status.set(item.subject) return else: self.status.set(item.body) self.after(100, self.check_queue, queue)
Example #29
Source File: application.py From Python-GUI-Programming-with-Tkinter with MIT License | 5 votes |
def upload_to_corporate_ftp(self): csvfile = self._create_csv_extract() d = v.LoginDialog( self, 'Login to ABQ Corporate FTP' ) if d.result is not None: username, password = d.result try: n.upload_to_corporate_ftp( csvfile, self.settings['abq_ftp_host'].get(), self.settings['abq_ftp_port'].get(), username, password ) except n.ftp.all_errors as e: messagebox.showerror('Error connecting to ftp', str(e)) else: messagebox.showinfo( 'Success', '{} successfully uploaded to FTP'.format(csvfile) )
Example #30
Source File: mainmenu.py From Python-GUI-Programming-with-Tkinter with MIT License | 5 votes |
def show_about(self): """Show the about dialog""" about_message = 'ABQ Data Entry' about_detail = ( 'by Alan D Moore\n' 'For assistance please contact the author.' ) messagebox.showinfo( title='About', message=about_message, detail=about_detail )