3 from wizard import deploy, command, shell
6 options, args = parse_args(argv, baton)
7 dir = os.path.abspath(args[0]) if args else os.getcwd()
8 shell.drop_priviledges(dir, options.log_file)
9 deployment = deploy.ProductionCopy(dir)
10 print deployment.dsn.database
12 def parse_args(argv, baton):
13 usage = """usage: %prog database [DIR]
15 Prints the name of the database an application is using.
16 Maybe in the future this will print more information."""
17 parser = command.WizardOptionParser(usage)
18 options, args = parser.parse_all(argv)
20 parser.error("too many arguments")
22 parser.error("must specify directory")