Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeffbryner/configlib
simple python wrapper for .conf file get, set, delete operations.
https://github.com/jeffbryner/configlib
Last synced: 11 days ago
JSON representation
simple python wrapper for .conf file get, set, delete operations.
- Host: GitHub
- URL: https://github.com/jeffbryner/configlib
- Owner: jeffbryner
- License: mpl-2.0
- Created: 2014-03-05T17:23:00.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-07-12T18:22:50.000Z (over 5 years ago)
- Last Synced: 2024-12-09T09:59:02.931Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
configlib
=========simple python wrapper for .conf file get, set, delete operations.
Use thusly:
.conf file:
```
[options]
somesetting=aDifferentValue```
python code:
```
from configlib import getConfig,OptionParser
def initConfig():
#initialize config options
#sets defaults or overrides from config file.
options.something=getConfig('somesetting','defaultvalue',options.configfile)
if __name__ == "__main__":
parser=OptionParser()
parser.add_option("-c", dest='configfile' , default='', help="configuration file to use")
(options,args) = parser.parse_args()
initConfig()
```pip install configlib