twblue/src/commandline.py

13 lines
580 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
import argparse
import paths
2015-01-18 17:19:39 -06:00
import logging
2015-04-19 18:10:34 -05:00
import application
2015-01-18 17:19:39 -06:00
log = logging.getLogger("commandlineLauncher")
2015-04-19 18:10:34 -05:00
parser = argparse.ArgumentParser(description=application.name+" command line launcher")
parser.add_argument("-d", "--data-directory", action="store", dest="directory", help="Specifies the directory where " + application.name + " saves userdata.")
args = parser.parse_args()
log.debug("Starting " + application.name + " with the following arguments: directory = %s" % (args.directory))
if args.directory != None: paths.directory = args.directory