擅长:python、mysql、java
<p>如果您现在对学习tkinter不感兴趣,<a href="http://easygui.sourceforge.net/" rel="nofollow">easygui</a>将非常适合于快速获得此测试的GUI。它不在标准库中,因此您必须使用<code>pip install</code>安装它,或者下载它并将轻松.py与脚本位于同一文件夹中。Easygui允许您执行以下操作:</p>
<pre><code>import easygui
animal = easygui.choicebox(
msg='Pick an animal.',
title='answer the question',
choices=('dog', 'cat', 'pig')
)
print animal
# prints dog or pig or cat
</code></pre>