source: server/lib/gutenbach-server.py @ 609a9b0

no-cups
Last change on this file since 609a9b0 was 609a9b0, checked in by Jessica B. Hamrick <jhamrick@…>, 12 years ago

Add basic configuration file support

  • Property mode set to 100644
File size: 398 bytes
Line 
1import gutenbach.server
2import sys
3import os
4import yaml
5
6if len(sys.argv) != 2:
7    print "Invalid number of arguments: %d" % len(sys.argv)
8    sys.exit(1)
9
10config = sys.argv[1]
11if not os.path.exists(config):
12    print "Invalid config: %s" % config
13    sys.exit(1)
14
15conf_dict = yaml.load(open(config, "r"))
16print "Loaded configuration file:"
17print conf_dict
18   
19gutenbach.server.start(conf_dict)
Note: See TracBrowser for help on using the repository browser.