예제 #1
0
def showDescription(filename=None):
    """Show the Description part of the docstring of a pyFormex script.

    If no file name is specified, the current script is used.
    If the script's docstring has no Description part, a default text is
    shown.
    """
    from scriptMenu import getDocString, getDescription

    if pf.GUI.canPlay:
        scriptfile = pf.prefcfg["curfile"]
        doc = getDocString(scriptfile)
        des = getDescription(doc)
        if len(des.strip()) == 0:
            des = """.. NoDescription

No help available
=================

The maintainers of this script have not yet added a description
for this example.

You can study the source code, and if anything is unclear,
ask for help on the pyFormex forums.
"""

        showText(des, modal=False)
예제 #2
0
def showDescription():
    """Show the Desription part of a pyFormex script's docstring."""
    from scriptMenu import getDocString,getDescription
    if GD.GUI.canPlay:
        scriptfile = GD.prefcfg['curfile']
        doc = getDocString(scriptfile)
        des = getDescription(doc)
        if len(des.strip()) == 0:
            des = """.. NoDescription

No help available
=================

The maintainers of this script have not yet added a description
for this example.

You can study the source code, and if anything is unclear,
ask for help on the pyFormex forums.
"""

        draw.showText(des,modal=False)