| 1 | # vim: set expandtab shiftwidth=4 softtabstop=4:
|
|---|
| 2 |
|
|---|
| 3 | from chimerax.core.commands import CmdDesc
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | def hello_world(session):
|
|---|
| 7 | # All command functions are invoked with ``session`` as its
|
|---|
| 8 | # first argument. Useful session attributes include:
|
|---|
| 9 | # logger: chimerax.core.logger.Logger instance
|
|---|
| 10 | # models: chimerax.core.models.Models instance
|
|---|
| 11 | session.logger.info("Hello world!")
|
|---|
| 12 |
|
|---|
| 13 | # CmdDesc contains the command description. For the
|
|---|
| 14 | # "hello" command, we expect no arguments.
|
|---|
| 15 | hello_world_desc = CmdDesc()
|
|---|