Python equivilant to msgbox()
Claudio Grondi
claudio.grondi at freenet.de
Mon Feb 13 09:57:12 EST 2006
LittlePython wrote:
> That is exactly what I was look for .. thx
Surprised to hear that.
As VisualBasic programmer I would expect you to have experience with
ActiveX on Windows, where the best way to go with Python is to reuse all
the ActiveX components and their known user interfaces (i.e. constants
to use as parameter and constants for interpretation of return values)
directly from within Python.
A message box goes e.g. this way:
>>> import win32com.client
>>> axWshShell = win32com.client.Dispatch("WScript.Shell")
>>> axWshShell.Popup(u"(MsgText)This axWshShell.Popup closes itself
after 45 seconds", 45, u"(MsgTitle)Testing WScript.Shell object:", 1)
By the way: is there a ready for direct use timed self closing Ok/Cancel
message box in any of the proposed GUI packages?
Claudio
>
>
> "Kent Johnson" <kent at kentsjohnson.com> wrote in message
> news:43efd40a$1_2 at newspeer2.tds.net...
>
>>LittlePython wrote:
>>
>>>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?
>>
>>Take a look at EasyGUI:
>>http://www.ferg.org/easygui/
>>
>>Kent
>
>
>
More information about the Python-list
mailing list