diff options
-rwxr-xr-x | cli.py | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -0,0 +1,29 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # vim: set filencoding=utf8 | ||
3 | """ | ||
4 | Exchange Calendar CLI App | ||
5 | |||
6 | @author: Mike Crute (mcrute@ag.com) | ||
7 | @organization: American Greetings Interactive | ||
8 | @date: May 02, 2011 | ||
9 | """ | ||
10 | |||
11 | from os import path | ||
12 | from util import config_dict | ||
13 | from exchange.wsgi import CalendarApp | ||
14 | from wsgiref.simple_server import make_server | ||
15 | |||
16 | |||
17 | def main(): | ||
18 | config = config_dict(path.expanduser('~/.exchange.cfg')) | ||
19 | password = open(path.expanduser('~/.exchange.pass'), 'r').read() | ||
20 | |||
21 | app = CalendarApp(config['exchange']['server'], | ||
22 | config['exchange']['user'], | ||
23 | password) | ||
24 | |||
25 | print app(None, lambda x, y: None) | ||
26 | |||
27 | |||
28 | if __name__ == '__main__': | ||
29 | main() | ||