Python等同于msgbox() [英] Python equivilant to msgbox()

查看:566
本文介绍了Python等同于msgbox()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有等同于msgbox()或wscript.echo(通过wcsript)。我想打电话给这个而不是打印(到屏幕上)。我想写一个简单的脚本,它不是一个事件驱动器gui,而是调用输入框,消息框,甚至可能是一个文件打开的浏览器框?

Is there an equivalent to a msgbox() or wscript.echo (via wcsript) . I would like to call this instead of print (to the screen) . I would like to write a simple script that is not an event drive gui but calls input boxes, message boxes, or maybe even a file open browser box as well?

推荐答案

LittlePython写道:
LittlePython wrote:
是否有相当于msgbox()或wscript.echo(通过wcsript)。我想打电话给这个而不是打印(到屏幕上)。我想写一个简单的脚本,它不是一个事件驱动器gui,而是调用输入框,消息框,甚至是一个文件打开的浏览器框?
Is there an equivalent to a msgbox() or wscript.echo (via wcsript) . I
would like to call this instead of print (to the screen) . I would like
to write a simple script that is not an event drive gui but calls input
boxes, message boxes, or maybe even a file open browser box as well?




看看EasyGUI:
http:/ /www.ferg.org/easygui/


Kent



Take a look at EasyGUI:
http://www.ferg.org/easygui/

Kent


这正是我所寻找的。 .thx

" Kent Johnson" <柯** @ kentsjohnson.com>在消息中写道

news:43 ********** @ newspeer2.tds.net ...
That is exactly what I was look for .. thx
"Kent Johnson" <ke**@kentsjohnson.com> wrote in message
news:43**********@newspeer2.tds.net...
LittlePython写道:
LittlePython wrote:
是否有等同于msgbox()或wscript.echo(通过wcsript)。我想打电话给这个而不是打印(到屏幕上)。我想写一个简单的脚本,它不是一个事件驱动器gui,而是调用输入框,消息框,甚至是一个文件打开的浏览器框?
Is there an equivalent to a msgbox() or wscript.echo (via wcsript) . I
would like to call this instead of print (to the screen) . I would like
to write a simple script that is not an event drive gui but calls input
boxes, message boxes, or maybe even a file open browser box as well?



看看EasyGUI:
http://www.ferg .org / easygui /

Kent



Take a look at EasyGUI:
http://www.ferg.org/easygui/

Kent



Kent Johnson写道:
Kent Johnson wrote:
LittlePython写道:
LittlePython wrote:
是否有相当于msgbox()或wscript.echo(通过wcsript)。我想打电话给这个而不是打印(到屏幕上)。我想写一个简单的脚本,它不是一个事件驱动器gui,而是调用输入框,消息框,甚至是一个文件打开的浏览器框?
Is there an equivalent to a msgbox() or wscript.echo (via wcsript) . I
would like to call this instead of print (to the screen) . I would like
to write a simple script that is not an event drive gui but calls input
boxes, message boxes, or maybe even a file open browser box as well?



看看EasyGUI:
http://www.ferg .org / easygui /

Kent



Take a look at EasyGUI:
http://www.ferg.org/easygui/

Kent



使用wxPython也可以这样做。尝试:

import wx

app = wx.PySimpleApp()

dlg = wx.TextEntryDialog(无,''输入值'', ''Title'','''')

如果dlg.ShowModal()== wx.ID_OK:

val = dlg.GetValue()#此行应该缩进

dlg.Destroy()

print"你输入的%s" %val


It''s also possible to something like that with wxPython. Try:
import wx
app = wx.PySimpleApp()
dlg = wx.TextEntryDialog(None, ''Enter value'', ''Title'', '''')
if dlg.ShowModal() == wx.ID_OK:
val = dlg.GetValue() # this line should be indented
dlg.Destroy()
print "you have entered %s" % val


这篇关于Python等同于msgbox()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆