Mercurial > code > home > repos > light9
comparison bin/ascoltami2 @ 536:519adb4e539f
asco startup improvements
Ignore-this: 41a4ce074e02e64166164813879380b
author | drewp@bigasterisk.com |
---|---|
date | Sun, 13 Jun 2010 07:56:06 +0000 |
parents | 1156d3531327 |
children | 94039df5cdd9 |
comparison
equal
deleted
inserted
replaced
535:481aa9a970b3 | 536:519adb4e539f |
---|---|
4 sys.path.append(".") | 4 sys.path.append(".") |
5 from light9.ascoltami.player import Player | 5 from light9.ascoltami.player import Player |
6 from light9.ascoltami.webapp import makeApp | 6 from light9.ascoltami.webapp import makeApp |
7 from light9 import networking, showconfig | 7 from light9 import networking, showconfig |
8 | 8 |
9 logging.basicConfig() | |
9 log = logging.getLogger() | 10 log = logging.getLogger() |
10 logging.basicConfig() | |
11 gobject.threads_init() | 11 gobject.threads_init() |
12 | 12 |
13 parser = optparse.OptionParser() | 13 parser = optparse.OptionParser() |
14 parser.add_option('--show', | 14 parser.add_option('--show', |
15 help='show URI, like http://light9.bigasterisk.com/show/dance2008') | 15 help='show URI, like http://light9.bigasterisk.com/show/dance2008') |
16 parser.add_option("-v", "--verbose", action="store_true", | 16 parser.add_option("-v", "--verbose", action="store_true", |
17 help="logging.DEBUG") | 17 help="logging.DEBUG") |
18 graph = showconfig.getGraph() | |
19 (options, args) = parser.parse_args() | 18 (options, args) = parser.parse_args() |
20 | |
21 | 19 |
22 log.setLevel(logging.DEBUG if options.verbose else logging.INFO) | 20 log.setLevel(logging.DEBUG if options.verbose else logging.INFO) |
23 | 21 |
24 graph = showconfig.getGraph() | |
25 if not options.show: | 22 if not options.show: |
26 raise ValueError("missing --show http://...") | 23 raise ValueError("missing --show http://...") |
27 | 24 |
25 graph = showconfig.getGraph() | |
28 player = Player() | 26 player = Player() |
29 | 27 |
30 # the cherrypy server would wedge when vidref pounds on it; this | 28 # the cherrypy server would wedge when vidref pounds on it; this |
31 # one seems to run | 29 # one seems to run |
32 thread.start_new(web.httpserver.runbasic, | 30 thread.start_new(web.httpserver.runbasic, |