سؤال

I create a custom command via

def spawn_pot(ctx):
    ctx.recurse ('po')


class spawnpot(BuildContext):
    cmd = 'spawnpot'
    fun = 'spawn_pot'

and I would like to set a tooltip, but I could not find how to do that. Currently the waf --help looks like this (truncated):

Main commands (example: ./waf build -j4)
build    : executes the build
...
updatepo : 
...
هل كانت مفيدة؟

المحلول

Just describe your method/class by either "" or """ """

def spawn_pot(ctx):
    """ Spawn Pot Target

        Multiline
    """
    ctx.recurse ('po')

class spawnpot(BuildContext):
    "SpawnPot Build Context Description"
    cmd = 'spawnpot'
    fun = 'spawn_pot'

This should give you something like this:

the_prompt> waf -h
...
spawn_pot:  Spawn Pot Target

            MultiLine

spawnpot :  SpawnPot Build Context Description
...
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top