tuerSock = "/run/tuer.sock"
# use a histfile
-# FIXME: Why not ".tyshellhist"?
-histfile = os.path.join(os.path.expanduser("~"), ".pyshellhist")
+histfile = os.path.join(os.path.expanduser("~"), ".tyshellhist")
try:
readline.read_history_file(histfile)
except IOError:
atexit.register(print, "Bye")
# available commands
-def help(c):
+def helpcmd(c):
print("Available commands: %s" % ", ".join(sorted(commands.keys())))
def extcmd(cmd):
commands = {
'exit': exitcmd,
- 'help': help,
+ 'help': helpcmd,
'open': sendcmd(tuerSock, 'open'),
'close': sendcmd(tuerSock, 'close'),
'buzz': sendcmd(tuerSock, 'buzz'),