首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >pgu/pgu中的列表

pgu/pgu中的列表
EN

Stack Overflow用户
提问于 2010-10-29 19:44:36
回答 1查看 686关注 0票数 0

我正在寻找帮助,在pgu gui的名单上进行游戏。我需要知道它们有哪些方法和属性,所以我可以将它们包括在我的程序中。

EN

回答 1

Stack Overflow用户

发布于 2010-10-29 20:11:33

我的第一个建议

使用python对进行反思

代码语言:javascript
复制
import pgu.gui.List
import inspect
help(pgu.gui.List) # to read out the doc strings
print dir(pgu.gui.List) # to get the namespace of List class
# to get all methods of that class
all_functions = inspect.getmembers(pgu.gui.List, inspect.isfunction) 

当源代码可用时,总是查看源代码。

  • http://code.google.com/p/pgu/source/browse/trunk/pgu/gui/area.py

代码中的:您可以创建和清除一个列表.

代码语言:javascript
复制
class List(ScrollArea):
    """A list of items in an area.

    <p>This widget can be a form element, it has a value set to whatever item is selected.</p>

    <pre>List(width,height)</pre>
    """
    ....
    def clear(self):
        """Clear the list.

        <pre>List.clear()</pre>
        """
        ...

使用:

代码语言:javascript
复制
# Create the actual widget
    usagelist = gui.List(width, height)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4055347

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档