PythonWin (much smaller post)

David Oppenheimer davidopp at megsinet.net
Wed Sep 22 02:58:31 EDT 1999


Dear Group,

When I run the following program in PythonWin, I get a dialogue box that
looks like any other Windows' window that asks for my age:

[Image]



so I enter my age (31) and but the output goes to the interactive
window:

--------------------------
>>>
That's 217 in dog years.
|
---------------------------

At about the same time the following window pops up:

[Image]

 How can I make the output go to the second dialogue box instead of to
the interactive window?  And I also want to get rid of the input space
and the cancel button on the second window.


### get the original age
age = input("Enter your age (in human years): ")
print           # print a blank line

### do some range checking, then print result
if age < 0:
        print "Negative age?!?  I don't think so."
elif age < 3 or age > 110:
        print "Frankly, I don't believe you."
else:
        print "That's", age*7, "in dog years."

### pause for Return key (so window doesn't disappear)
raw_input('<press OK>')

Thanks in advance,

David O.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/19990922/edd3dda4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C:\WINDOWS\TEMP\nsmailDB.jpeg
Type: image/jpeg
Size: 4399 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/19990922/edd3dda4/attachment.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C:\WINDOWS\TEMP\nsmail7N.jpeg
Type: image/jpeg
Size: 4053 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/19990922/edd3dda4/attachment-0001.jpeg>


More information about the Python-list mailing list