Mercurial > treepkg
comparison bin/starttreepkgweb.py @ 78:9a602d8eaa60
initial revision of the subversion repository
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 24 Apr 2012 17:13:43 +0200 |
parents | |
children | 4adcb15cbdfb |
comparison
equal
deleted
inserted
replaced
77:f0aa5a8af056 | 78:9a602d8eaa60 |
---|---|
1 #! /usr/bin/python2.4 | |
2 # Copyright (C) 2007 by Intevation GmbH | |
3 # Authors: | |
4 # Bernhard Herzog <bh@intevation.de> | |
5 # | |
6 # This program is free software under the GPL (>=v2) | |
7 # Read the file COPYING coming with the software for details. | |
8 | |
9 """Starts the tree packager webinterface""" | |
10 | |
11 import sys | |
12 import os | |
13 from optparse import OptionParser | |
14 | |
15 import treepkgcmd | |
16 from treepkg.options import create_parser | |
17 from treepkg.web import runserver | |
18 | |
19 def parse_commandline(): | |
20 parser = create_parser() | |
21 parser.set_defaults(cherrypy_config=os.path.join(treepkgcmd.topdir, | |
22 "cherrypy.cfg")) | |
23 parser.add_option("--cherrypy-config", | |
24 help=("The cherrypy config file for the web interface." | |
25 " Default cherrypy.cfg")) | |
26 return parser.parse_args() | |
27 | |
28 def main(): | |
29 options, args = parse_commandline() | |
30 runserver(options.config_file, options.cherrypy_config) | |
31 | |
32 main() |