From 295883dab560fc922bbac9527f83f79139da4967 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Mon, 2 May 2011 14:20:07 -0400 Subject: Adding cli version of the server --- cli.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 cli.py diff --git a/cli.py b/cli.py new file mode 100755 index 0000000..e190345 --- /dev/null +++ b/cli.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# vim: set filencoding=utf8 +""" +Exchange Calendar CLI App + +@author: Mike Crute (mcrute@ag.com) +@organization: American Greetings Interactive +@date: May 02, 2011 +""" + +from os import path +from util import config_dict +from exchange.wsgi import CalendarApp +from wsgiref.simple_server import make_server + + +def main(): + config = config_dict(path.expanduser('~/.exchange.cfg')) + password = open(path.expanduser('~/.exchange.pass'), 'r').read() + + app = CalendarApp(config['exchange']['server'], + config['exchange']['user'], + password) + + print app(None, lambda x, y: None) + + +if __name__ == '__main__': + main() -- cgit v1.2.3