我正在将MAC OS用于python程序。如果条件为真,我想显示一个消息框。有人可以告诉我如何为macOS创建Python消息框,当条件为<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration SYSTEM
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/booksdb</property>
<property name="hibernate.connection.username">xxxx</property>
<property name="hibernate.connection.password">xxxx</property>
</session-factory>
</hibernate-configuration>
或True
时可以调用该消息框吗?
我尝试了
False
但是,根据情况,我不知道如何打电话。
答案 0 :(得分:0)
可能对您有帮助
import Tkinter
import tkMessageBox
# An error box
if(condition)
tkMessageBox.showerror("Error","No disk space left on device")
# A warning box
if(condition)
tkMessageBox.showwarning("Warning","Could not start
service")
# An information box
if(condition)
tkMessageBox.showinfo("Information","Created in Python.")