mirror of https://github.com/BOINC/boinc.git
41 lines
487 B
Plaintext
41 lines
487 B
Plaintext
|
#!/usr/bin/env python
|
||
|
|
||
|
# -*- mode: python; python-indent: 4; -*-
|
||
|
|
||
|
|
||
|
|
||
|
## $Id$
|
||
|
|
||
|
|
||
|
|
||
|
'''
|
||
|
|
||
|
|
||
|
|
||
|
A program to pass config file settings to calling programs via stdout
|
||
|
|
||
|
|
||
|
|
||
|
'''
|
||
|
|
||
|
|
||
|
|
||
|
import boinc_path_config
|
||
|
from Boinc import configxml
|
||
|
|
||
|
import sys, os
|
||
|
|
||
|
|
||
|
|
||
|
program_path = os.path.realpath(os.path.dirname(sys.argv[0]))
|
||
|
|
||
|
config_filename = os.path.realpath(os.path.join(program_path, '../config.xml'))
|
||
|
|
||
|
|
||
|
|
||
|
config = configxml.ConfigFile(config_filename).read()
|
||
|
|
||
|
|
||
|
print config.config.__dict__.get(sys.argv[1])
|
||
|
|