folder rename
--HG-- branch : sandbox
This commit is contained in:
@@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
# Copyright (c) 2011 Andreas Balogh
|
|
||||||
# See LICENSE for details.
|
|
||||||
|
|
||||||
""" main progam template """
|
|
||||||
|
|
||||||
# system imports
|
|
||||||
|
|
||||||
from argparse import ArgumentParser
|
|
||||||
import logging
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
|
|
||||||
# globals
|
|
||||||
|
|
||||||
LOG = logging.getLogger()
|
|
||||||
|
|
||||||
# definitions
|
|
||||||
|
|
||||||
def main(argv=None):
|
|
||||||
if argv is None:
|
|
||||||
argv = sys.argv
|
|
||||||
# parse options and arguments
|
|
||||||
parser = ArgumentParser(description="Price Publisher")
|
|
||||||
parser.add_argument("-f", "--file", dest="filename",
|
|
||||||
help="read configuration from %(dest)s")
|
|
||||||
parser.add_argument("-p", "--port", default=8001, type=int,
|
|
||||||
help="server port [default: %(default)s")
|
|
||||||
args = parser.parse_args()
|
|
||||||
LOG.info("starting '%s %s'", os.path.basename(argv[0]), args)
|
|
||||||
# startup application
|
|
||||||
# insert your code here
|
|
||||||
LOG.info("done.")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
logging.basicConfig(level=logging.DEBUG,
|
|
||||||
format='%(asctime)s.%(msecs)03i %(levelname).4s %(funcName)10s %(message)s',
|
|
||||||
datefmt='%H:%M:%S')
|
|
||||||
main()
|
|
||||||
Reference in New Issue
Block a user