Compile, Read and update your .conf file in python
Project description
Compile, Read and update your .conf file in python
Read data
>>> from confcompiler import ConfRead
>>>
>>> Hostname = ConfRead('Config.conf', 'Hostname')
>>> Hostname
127.0.0.1
>>> type(Hostname)
<class 'str'>
>>>
>>> Connected = ConfRead('Config.conf', 'Connected')
>>> Connected
True
>>> type(Connected)
<class 'bool'>
Write data
>>> from confcompiler import ConfWrite
>>>
>>> ConfWrite('Config.conf', 'Hostname', '127.0.0.1')
>>> ConfWrite('Config.conf', 'Connected', True)
.conf cheat sheat
Commenting - All comments must start with '#' and must be on
there on line, you cannot comment a line with
data involved.
Variables - Data must start with a variable name then continued
with '=' after that the data.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
confcompiler-0.0.2.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for confcompiler-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bc6c0bbb1cdf84389a6c9cbbcc29b13b55d5ba73fa5d4b6f8c90343d70ca25b |
|
MD5 | a1d9c279a2ce2d1b33a61032b62db3d9 |
|
BLAKE2b-256 | 5f6fcc28371e0ab99ba8b83206abb4467226a39c8b2b3d8db5231f990fb4a75e |