aszc / java-configparser Goto Github PK
View Code? Open in Web Editor NEWA Python-compatible Java INI parser
License: Apache License 2.0
A Python-compatible Java INI parser
License: Apache License 2.0
Could you change the methods read/write to accept the interfaces Reader/Writer instead the bufferred implementation.
This is better for who handle ConfigParser with string instead directly from files and avoid flush every times also if we are using not buffered writer.
If I set InlineCommentPrefixes option to any value this cause alwasy an IndexOutOfBoundException during parse of any file.
I have a PyPI config file like this:
[distutils]
index-servers =
pypi
pypitest
[pypi]
repository: https://pypi.python.org/pypi
username: your_username
password: your_password
[pypitest]
repository: https://testpypi.python.org/pypi
username: your_username
password: your_password
Now I would add a new server to the index:
Ini ini = new Ini();
ini.read(file);
ini.sections().get("distutils").put("index-servers", "test\npypi\npypitest")
ini.getSections().put("test", new HashMap<String, String>());
ini.write(file2);
the files will contains:
[distutils]
index-servers =
pypi
pypitest
[pypi]
repository: https://pypi.python.org/pypi
username: your_username
password: your_password
[pypitest]
repository: https://testpypi.python.org/pypi
username: your_username
password: your_password
[test]
the new value of index-servers "test\npypi\npypitest" is replaced by interpolation with "\npypi\npypitest". The first row is removed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.