Python tkMessageBox.showinfo() Examples
The following are 30
code examples of tkMessageBox.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
tkMessageBox
, or try the search function
.
Example #1
Source File: configurator.py From Enrich2 with BSD 3-Clause "New" or "Revised" License | 6 votes |
def menu_saveas(self): if self.root_element is None: tkMessageBox.showwarning(None, "Cannot save empty configuration.") else: fname = tkFileDialog.asksaveasfilename() if len(fname) > 0: # file was selected try: with open(fname, "w") as handle: write_json(self.root_element.serialize(), handle) except IOError: tkMessageBox.showerror(None, "Failed to save config file.") else: self.cfg_file_name.set(fname) tkMessageBox.showinfo( None, "Save successful:\n{}".format(self.cfg_file_name.get()) )
Example #2
Source File: SdkCompile.py From aurora-sdk-mac with Apache License 2.0 | 6 votes |
def sdk_compile(plugin_dir): makefile_dir = plugin_dir + "/Debug/" print(makefile_dir) make_clean_process = subprocess.Popen(["make", "clean"], cwd=makefile_dir, stdout=subprocess.PIPE) while True: line = make_clean_process.stdout.readline().decode() if line != "": print (line) else: break make_all_process = subprocess.Popen(["make", "all"], cwd=makefile_dir, stdout=subprocess.PIPE) while True: line = make_all_process.stdout.readline().decode() if line != "": print (line) else: break plugin_built = check_if_sdk_file_built(plugin_dir) if not plugin_built: tkMessageBox.showinfo("Build result", "Build Failed") else: tkMessageBox.showinfo("Build result", "Build Successful")
Example #3
Source File: falldetect2.5.py From Fall-Detection with MIT License | 6 votes |
def Real_Time(): global data_path global ip_camera global enable if ip_camera == "": tkMessageBox.showinfo("Warning", "\nPlease Set WebCam Address!") return data_path = "real_time" s = "rm -rf real_time" os.system(s) s = "./build/examples/openpose/openpose.bin --no_display --write_images real_time/Image/ --write_keypoint_json real_time/Data --net_resolution 640x480--ip_camera " + ip_camera os.system(s) # time.pause(10) enable = 1 do_analysis() # UI TOP
Example #4
Source File: recipe-203611.py From code with MIT License | 6 votes |
def main(): comment = os.environ.get('CLEARCASE_COMMENT','') version = os.environ['CLEARCASE_XPN'] error = 0 caseIds = checkComment(comment) if not caseIds: error = 1 tkMessageBox.showerror("Missing Case ID in check-in-comment", "Version:\n%s\n\nKommentar:\n%s" % (version, comment)) sys.exit(error) # Remove # below to see what environment variables ClearCase sets. # #text = "\n".join( [" = ".join(x) for x in os.environ.items() # if x[0].startswith('CLEARCASE')]) #tkMessageBox.showinfo("Environment variable", text)
Example #5
Source File: gui.py From sky3ds.py with MIT License | 6 votes |
def check_for_template(self): root.update_idletasks() #since this is run during view __init__ before mainloop finishes a loop we have to update tk() so it responds properly to input events. data_dir = user_data_dir('sky3ds', 'Aperture Laboratories') template_txt = os.path.join(data_dir, 'template.txt') if not os.path.isfile(template_txt): tkMessageBox.showinfo("Template.txt not found.", "Template.txt not found, please select a Sky3ds template file") update_template() else: pass
Example #6
Source File: Airtun-ng.py From Airvengers with GNU General Public License v2.0 | 6 votes |
def browse_file(self): self.fname = tkFileDialog.askopenfilename(filetypes = (("Template files", "*.type"), ("All files", "*"))) # def submit(self): # print('Name: {}'.format(self.entry_name.get())) # print('Email: {}'.format(self.entry_email.get())) # print('Comments: {}'.format(self.text_comments.get(1.0, 'end'))) # self.clear() # tkMessageBox.showinfo(title = 'Explore California Feedback', message = 'Comments Submitted!') # # def clear(self): # self.entry_name.delete(0, 'end') # self.entry_email.delete(0, 'end') # self.text_comments.delete(1.0, 'end') #
Example #7
Source File: old_boopsniff_gui.py From BoopSuite with MIT License | 6 votes |
def print_info(self, object_name, object_type): if object_type == "AP": tkMessageBox.showinfo(Global_Access_Points[object_name].mssid, ( "Mac address: " + Global_Access_Points[object_name].mmac + "\nEncryption: " + Global_Access_Points[object_name].menc + "\nChannel: " + Global_Access_Points[object_name].mch + "\nVendor: " + Global_Access_Points[object_name].mven + "\nSignal strength: " + str(Global_Access_Points[object_name].msig) + "\nBeacons: " + str(Global_Access_Points[object_name].mbeacons)) ) else: tkMessageBox.showinfo("Client Info", ("Mac address: "+Global_Clients[object_name].mmac+ "\nAccess Point Mac: "+Global_Access_Points[Global_Clients[object_name].mbssid].mmac+ "\nNoise: "+str(Global_Clients[object_name].mnoise)+ "\nSignal Strength: "+str(Global_Clients[object_name].msig)+ "\nAccess Point Name: "+Global_Access_Points[Global_Clients[object_name].mbssid].mssid) ) print(object_name)
Example #8
Source File: falldetect2.5.py From Fall-Detection with MIT License | 6 votes |
def Change_video(): global target_video global video_entry global video_entrywindow global old_frame old_frame = -30 if video_entry.get() == "": tkMessageBox.showinfo("Warning", "The input is invalid!") video_entrywindow.destroy() return file = video_entry.get() + "/Data/" + video_entry.get() + "_" + str(index).zfill(12) + "_keypoints.json" try: fh = open(file) except IOError: print "No such file!" tkMessageBox.showinfo("Warning", "\nDirectory not found!") return target_video = video_entry.get() print target_video video_entrywindow.destroy() # IP Camera Set
Example #9
Source File: inkrecognizer_sample.py From cognitive-services-python-sdk-samples with MIT License | 6 votes |
def send_request(self, ink_stroke_list): self._root = None try: root = self._client.recognize_ink( ink_stroke_list, # Arguments for this request only. language=LANGUAGE_RECOGNITION_LOCALE, logging_enable=True ) result_text = [] for word in root.ink_words: result_text.append(word.recognized_text) for shape in root.ink_drawings: result_text.append(shape.recognized_shape.value) result_text = "\n".join(result_text) return result_text self._root = root except Exception as e: messagebox.showinfo("Error", e) # </inkClient> # <recognitionManager>
Example #10
Source File: main.py From PiPark with GNU General Public License v2.0 | 6 votes |
def clickStartPreview(self): """Handle 'Start Preview' button click events. """ if self.__is_verbose: print "ACTION: 'Start Preview' clicked! " # turn on the camera preview if self.__camera and not self.__preview_is_active: tkMessageBox.showinfo( title = "Show Camera Feed", message = "Press the ESCAPE key to exit preview mode" ) #self.__camera.brightness = 70; #self.__camera.awb_mode = 'auto'; self.__camera.start_preview() self.__preview_is_active = True if self.__is_verbose: print "INFO: Camera preview started. " # reset focus to the application frame self.focus_set()
Example #11
Source File: setup_selectarea.py From PiPark with GNU General Public License v2.0 | 6 votes |
def output_coords(): # Open the file to output the co-ordinates to f1 = open('./setup_data.py', 'w+') # Print the dictionary data to the file print >>f1, 'boxes = [' for i in range(Boxes.length()): c = Boxes.get(i).get_output(SelWindow.bgcoords) if c != None: o = (i) print >>f1, c, ',' print >>f1, ']' print 'INFO: Box data saved in file boxdata.py.' tkMessageBox.showinfo("Pi Setup", "Box data saved in file.") # ----------------------------------------------------------------------------- # Main Program # -----------------------------------------------------------------------------
Example #12
Source File: menotexport-gui.py From Menotexport with GNU General Public License v3.0 | 6 votes |
def showHelp(self): helpstr=''' %s\n\n - Export PDFs: Bulk export PDFs.\n - Extract highlights: Extract highlighted texts and output to txt files.\n - Extract notes: Extract notes and output to txt files.\n - Export .bib: Export meta-data and annotations to .bib files.\n - Export .ris: Export meta-data and annotations to .ris files.\n - For import to Zotero: Exported .bib and/or .ris files have suitable format to import to Zotero.\n - Save separately: If on, save each PDF's annotations to a separate txt.\n - Use custom annotation template: Use a custom template to format the exported annotations. See annotation_template.py for details. - See README.md for more info.\n ''' %self.title tkMessageBox.showinfo(title='Help', message=helpstr) #print(self.menfolder.get())
Example #13
Source File: Tkeditor.py From Tkinter-Projects with MIT License | 5 votes |
def about(): tkMessageBox.showinfo("About", "A Editor using Tkinter by Leohc92")
Example #14
Source File: ScribusGenerator.py From ScribusGenerator with MIT License | 5 votes |
def scribusLoadSettingsHandler(self): slaFile = self.__scribusSourceFileEntryVariable.get() if(slaFile is CONST.EMPTY): tkMessageBox.showinfo( 'Choose a file', message="Set a valid scribus input file prior to loading its settings.") return dataObject = GeneratorDataObject( scribusSourceFile=slaFile ) generator = ScribusGenerator(dataObject) saved = generator.getSavedSettings() if (saved): dataObject.loadFromString(saved) # self.__scribusSourceFileEntryVariable = StringVar() #not loaded self.__dataSourceFileEntryVariable.set( dataObject.getDataSourceFile()) self.__dataSeparatorEntryVariable.set(dataObject.getCsvSeparator()) self.__outputDirectoryEntryVariable.set( dataObject.getOutputDirectory()) self.__outputFileNameEntryVariable.set( dataObject.getOutputFileName()) self.__selectedOutputFormat.set(dataObject.getOutputFormat()) self.__keepGeneratedScribusFilesCheckboxVariable.set( dataObject.getKeepGeneratedScribusFiles()) self.__mergeOutputCheckboxVariable.set( dataObject.getSingleOutput()) # self.__saveCheckboxVariable = IntVar() #not loaded self.__fromVariable.set(dataObject.getFirstRow()) self.__toVariable.set(dataObject.getLastRow()) self.__closeDialogVariable.set(dataObject.getCloseDialog()) else: tkMessageBox.showinfo( 'No Settings', message="Input scribus file contains no former saved settings.")
Example #15
Source File: spgl.py From Projects with GNU General Public License v3.0 | 5 votes |
def show_info(self, title, message): return messagebox.showinfo(title, message)
Example #16
Source File: root.py From PCWG with MIT License | 5 votes |
def About(self): tkMessageBox.showinfo("PCWG-Tool About", "Version: {vers} \nVisit http://www.pcwg.org for more info".format(vers=ver.version))
Example #17
Source File: TkDrumMachine.py From Tkinter-Projects with MIT License | 5 votes |
def about(self): tkMessageBox.showinfo("About", "Tkinter GUI Application\n Development by Leohc92")
Example #18
Source File: falldetect2.5.py From Fall-Detection with MIT License | 5 votes |
def Change_email(): global target_email global email_entry global email_entrywindow if email_entry.get() == "": tkMessageBox.showinfo("Warning", "The input is invalid!") email_entrywindow.destroy() return target_email = email_entry.get() print target_email email_entrywindow.destroy() # Video_set
Example #19
Source File: ScribusGenerator.py From ScribusGenerator with MIT License | 5 votes |
def buttonOkHandler(self): if (CONST.TRUE == self.allValuesSet()): dataObject = self.createGeneratorDataObject() generator = ScribusGenerator(dataObject) try: generator.run() if(dataObject.getCloseDialog()): self.__root.destroy() else: tkMessageBox.showinfo('Scribus Generator', message='Done. Generated files are in '+dataObject.getOutputDirectory()) except IOError as e: # except FileNotFoundError as e: tkMessageBox.showerror( title='File Not Found', message="Could not find some input file, please verify your Scribus and Data file settings:\n\n %s" % e) except ValueError as e: tkMessageBox.showerror( title='Variable Error', message="Could likely not replace a variable with its value,\nplease check your Data File and Data Separator settings:\n\n %s" % e) except IndexError as e: tkMessageBox.showerror( title='Variable Error', message="Could not find the value for one variable.\nplease check your Data File and Data Separator settings.\n\n %s" % e) except Exception: tkMessageBox.showerror(title='Error Scribus Generator', message="Something went wrong.\n\nRead the log file for more (in your home directory)."+traceback.format_exc()) else: tkMessageBox.showerror( title='Validation failed', message='Please check if all settings have been set correctly!')
Example #20
Source File: juegochozas.py From Tutoriales_juegos_Python with GNU General Public License v3.0 | 5 votes |
def anunciar_ganador(self, data): messagebox.showinfo("¡Atención!", message=data) # Handle Events
Example #21
Source File: spgl.py From SPGL with GNU General Public License v3.0 | 5 votes |
def show_info(self, title, message): return messagebox.showinfo(title, message)
Example #22
Source File: spgl.py From SPGL with GNU General Public License v3.0 | 5 votes |
def show_info(self, title, message): return messagebox.showinfo(title, message)
Example #23
Source File: PyncheWidget.py From datafari with Apache License 2.0 | 5 votes |
def __popup_about(self, event=None): from Main import __version__ tkMessageBox.showinfo('About Pynche ' + __version__, '''\ Pynche %s The PYthonically Natural Color and Hue Editor For information contact: Barry A. Warsaw email: bwarsaw@python.org''' % __version__)
Example #24
Source File: sqlite_bro.py From sqlite_bro with MIT License | 5 votes |
def create_menu(self): """create the menu of the application""" menubar = Menu(self.tk_win) self.tk_win['menu'] = menubar # feeding the top level menu self.menu = Menu(menubar) menubar.add_cascade(menu=self.menu, label='Database') self.menu_help = Menu(menubar) menubar.add_cascade(menu=self.menu_help, label='?') # feeding database sub-menu self.menu.add_command(label='New Database', command=self.new_db) self.menu.add_command(label='New In-Memory Database', command=lambda: self.new_db(":memory:")) self.menu.add_command(label='Open Database ...', command=self.open_db) self.menu.add_command(label='Open Database ...(legacy auto-commit)', command=lambda: self.open_db("")) self.menu.add_command(label='Close Database', command=self.close_db) self.menu.add_separator() self.menu.add_command(label='Attach Database', command=self.attach_db) self.menu.add_separator() self.menu.add_command(label='Quit', command=self.quit_db) self.menu_help.add_command(label='about', command=lambda: messagebox.showinfo(message=""" \nSQLite_bro : a graphic SQLite Client in 1 Python file \n("""+self.__version__+") " + self._title+""" \n(https://github.com/stonebig/sqlite_bro)"""))
Example #25
Source File: configurator.py From Enrich2 with BSD 3-Clause "New" or "Revised" License | 5 votes |
def menu_save(self): if len(self.cfg_file_name.get()) == 0: self.menu_saveas() elif self.root_element is None: tkMessageBox.showwarning(None, "Cannot save empty configuration.") else: try: with open(self.cfg_file_name.get(), "w") as handle: write_json(self.root_element.serialize(), handle) except IOError: tkMessageBox.showerror(None, "Failed to save config file.") else: tkMessageBox.showinfo( None, "Save successful:\n{}".format(self.cfg_file_name.get()) )
Example #26
Source File: imencrypt.py From IMEncrypt with MIT License | 5 votes |
def enc_success(imagename): tkMessageBox.showinfo("Success","Encrypted Image: " + imagename) # image encrypt button event
Example #27
Source File: imencrypt.py From IMEncrypt with MIT License | 5 votes |
def pass_alert(): tkMessageBox.showinfo("Password Alert","Please enter a password.")
Example #28
Source File: IntSeg_GUI.py From Intseg with MIT License | 5 votes |
def onNextMethod(self): mbox.showinfo("Information", "One task completed! Thank you!" )
Example #29
Source File: IntSeg_GUI.py From Intseg with MIT License | 5 votes |
def onNextImg(self): mbox.showinfo("Information", "One task completed! Thank you!")
Example #30
Source File: __main__.py From PyQuiz with MIT License | 5 votes |
def about(self): ''' Load the About Info Box. ''' tkMessageBox.showinfo("About PyQuiz!","Welcome to PyQuiz! v0.3\n PyQuiz is developed to explore Tkinter and then started off as a simple application.\nPyQuiz! is maintained at \nhttps://github.com/abhijitnathwani/PyQuiz/ \n\nYour contributions and suggestions are welcome. Feel free to fork and pull changes to PyQuiz! The application is open-source and is open for development.\n\nPyQuiz is developed and maintained by Abhijit Nathwani. For suggestions and changes, feel free to drop an email:\n abhijit[dot]nathwani[at]gmail[dot]com .\n\nInitial Release: Sept '17.")