It is easy to write and read .ini.
Project description
This was created because the author found it difficult to use “configparser”. “edit ini” is partially compatible with “configparser”. You can create, edit and delete “[section]” and “option = value” for files with “.ini” extension. 日本語版はこちらです
License
Copyright (c) 2020 Penguin0093 Released under the MIT license https://opensource.org/licenses/mit-license.php
How to use it.
The basic style is:
iniio.iopen("File name","Open mode","section","option","value")
1.Import
from editini Import iniio
2.Writing
Code
iniio.iopen("config.ini","w","section","option","value")
Result config.ini
[section] option = value
If the “value” is empty, “” (empty character) is substituted
3.Reading
iniio.iopen(" .ini","r","section","option")
config.ini
[section] option = value
Code
print(iniio.iopen("config.ini","r","section","option")+"\n")
print(iniio.iopen("config.ini","r","section")+"\n")
print(iniio.iopen("config.ini","r")+"\n")
Result
value option = value [section] option = value
4.Delete
iniio.iopen(" .ini","d","section","option")
config.ini
[section] option = value
Code #1
iniio.iopen("config.ini","d","section","option")
Result #1 config.ini
[section]
Code #2
iniio.iopen("config.ini","d","section")
Result #2 config.ini
(Empty)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file editini-1.0.5.tar.gz.
File metadata
- Download URL: editini-1.0.5.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3770db3259f04cd1671aa1a8522c1d9b6159ac35ee746b41c19db05fdae91b98
|
|
| MD5 |
5b54459a91bb3be37b6b6354b4b67cae
|
|
| BLAKE2b-256 |
62021189e5af795ff59b55e9b226639e24708c895be70d13d1896062306752e1
|
File details
Details for the file editini-1.0.5-py3-none-any.whl.
File metadata
- Download URL: editini-1.0.5-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3008a692854b11303b599e86ec5ceeea5d6c6b9676c12cc56019004cdc407286
|
|
| MD5 |
f687b39ef70af76b44b53766f089cd57
|
|
| BLAKE2b-256 |
4025338d44d3aa8ee479ec996f1f4e2f68b917127bd10ced4a2372d32b1e047e
|