Tidied python plugins

Use private naming convention
Move local callback functions to top
This commit is contained in:
James Booth
2013-09-20 00:49:13 +01:00
parent ccf9f7591a
commit 14b5b3ac23
7 changed files with 100 additions and 103 deletions

View File

@@ -1,9 +1,9 @@
import prof
import getpass
def prof_init(version, status):
prof.register_command("/whoami", 0, 0, "/whoami", "Call shell whoami command.", "Call shell whoami command.", cmd_whoami)
def cmd_whoami():
def _cmd_whoami():
me = getpass.getuser()
prof.cons_show(me)
def prof_init(version, status):
prof.register_command("/whoami", 0, 0, "/whoami", "Call shell whoami command.", "Call shell whoami command.", _cmd_whoami)