From 26c01102d7a4cb9b6b30207bb45d95437dd53cb3 Mon Sep 17 00:00:00 2001 From: Christoph Hirtz Date: Wed, 15 Oct 2014 15:10:31 +0200 Subject: [PATCH] small changes --- blinkclient.py | 9 ++++++++- blinkconfig.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/blinkclient.py b/blinkclient.py index 22be884..4db94f6 100755 --- a/blinkclient.py +++ b/blinkclient.py @@ -2,6 +2,7 @@ from socket_protocol import BlinkClient from blinkconfig import * import cmd +import sys class Prompt(cmd.Cmd): @@ -42,9 +43,15 @@ def do_show_clips(self, line): ret = connector.get_available_clips() print(ret) + def do_quit(self, line): + return True + def help_load_file(self): print("Reads a file and adds it to the list of available clips.") if __name__ == '__main__': - connector = BlinkClient(getstring("ethernet_host"), getint("ethernet_port")) + args = sys.argv[1:] + host = args[0] if len(args) > 0 else getstring("ethernet_host") + port = int(args[1]) if len(args) == 2 else getint("ethernet_port") + connector = BlinkClient(host, port) Prompt().cmdloop() diff --git a/blinkconfig.py b/blinkconfig.py index 1955d5f..fe3acc9 100644 --- a/blinkconfig.py +++ b/blinkconfig.py @@ -1,7 +1,7 @@ from collections import namedtuple from os.path import expanduser -VERSION = "1.0.7" +VERSION = "1.0.8" AUTHOR = "Christoph Hirtz" MAIL = "christoph.hirtz@online.de"