From 931ebeabf4a378b303f6868d34ca66b433d28188 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 22 Sep 2014 23:05:30 -0400 Subject: package this up as a script --- termcast_client/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'termcast_client/__init__.py') diff --git a/termcast_client/__init__.py b/termcast_client/__init__.py index 64e6c2a..c3c8a55 100644 --- a/termcast_client/__init__.py +++ b/termcast_client/__init__.py @@ -1,12 +1,13 @@ import argparse import json import os -import pity import shutil import signal import socket import sys +from . import pity + class Client(object): def __init__(self, host, port, username, password): self.host = host @@ -71,7 +72,7 @@ class Client(object): def _build_metadata_string(self, data): return b'\033]499;' + json.dumps(data).encode('utf-8') + b'\007' -if __name__ == '__main__': +def main(): parser = argparse.ArgumentParser() parser.add_argument('--host', default="noway.ratry.ru") parser.add_argument('--port', type=int, default=31337) -- cgit v1.2.3-54-g00ecf