diff options
author | bfox <bfox> | 2001-06-20 23:27:02 +0000 |
---|---|---|
committer | bfox <bfox> | 2001-06-20 23:27:02 +0000 |
commit | a5161a665fbba094ff76dc25824b56378b111f1f (patch) | |
tree | 337d25f94a21f85c08b63b5a2562a98a0c56fa34 | |
parent | e868f08bfc90e2c5dd3b36f586fd517d87004de0 (diff) | |
download | anaconda-a5161a665fbba094ff76dc25824b56378b111f1f.tar.gz anaconda-a5161a665fbba094ff76dc25824b56378b111f1f.tar.xz anaconda-a5161a665fbba094ff76dc25824b56378b111f1f.zip |
a parser for anaconda.conf
-rwxr-xr-x | readConfigFile.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/readConfigFile.py b/readConfigFile.py new file mode 100755 index 000000000..5d84573c4 --- /dev/null +++ b/readConfigFile.py @@ -0,0 +1,23 @@ +#!/usr/bin/python +import string + + +def getConfigFile(): + import string + + f = open("anaconda.conf", "r") + lines = f.readlines() + f.close() + + dict = {} + + for line in lines: + line = string.strip(line) + + if string.find (line, "#") > -1 or line == "": + pass + else: + tokens = string.split(line) + dict[tokens[0]] = tokens[1] + + return dict |