Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > PyINI : Cross-Platform INI parser

Reply
Thread Tools

PyINI : Cross-Platform INI parser

 
 
SeSe
Guest
Posts: n/a
 
      02-11-2005
hi, every one,

I started a opensource project PyINI for corss-platform *.ini parsing at
http://sourceforge.net/projects/pyini/

I have released a simple alpha version, which can read *.ini, with some
extended features such as "key=value1,value2,value3". I also made a
c++ binding to PyINI with elmer toolkit.

Yours,
SeSe
 
Reply With Quote
 
 
 
 
Giovanni Bajo
Guest
Posts: n/a
 
      02-11-2005
SeSe wrote:

> hi, every one,
>
> I started a opensource project PyINI for corss-platform *.ini parsing
> at http://sourceforge.net/projects/pyini/
>
> I have released a simple alpha version, which can read *.ini, with
> some extended features such as "key=value1,value2,value3". I also
> made a c++ binding to PyINI with elmer toolkit.



The most useful feature would be to be able to write INI files back without
affecting their formatting, without removing user commands, etc. This is what
Windows APIs do, and it is what I am missing from most INI parsing libraries
out there.
--
Giovanni Bajo


 
Reply With Quote
 
 
 
 
Dalius Dobravolskas
Guest
Posts: n/a
 
      02-11-2005
Hello,

> I started a opensource project PyINI for corss-platform *.ini parsing at
> http://sourceforge.net/projects/pyini/

How it is different from http://docs.python.org/lib/module-ConfigParser.html?

Dalius
 
Reply With Quote
 
Thomas Heller
Guest
Posts: n/a
 
      02-11-2005
"Giovanni Bajo" <(E-Mail Removed)> writes:

> SeSe wrote:
>
>> hi, every one,
>>
>> I started a opensource project PyINI for corss-platform *.ini parsing
>> at http://sourceforge.net/projects/pyini/
>>
>> I have released a simple alpha version, which can read *.ini, with
>> some extended features such as "key=value1,value2,value3". I also
>> made a c++ binding to PyINI with elmer toolkit.

>
>
> The most useful feature would be to be able to write INI files back without
> affecting their formatting, without removing user commands, etc. This is what
> Windows APIs do, and it is what I am missing from most INI parsing libraries
> out there.


You can easily access the windows apis either with pywin32, or with
ctypes for those functions that aren't wrapped in pywin32.

Thomas
 
Reply With Quote
 
Fuzzyman
Guest
Posts: n/a
 
      02-11-2005

Giovanni Bajo wrote:
> SeSe wrote:
>
> > hi, every one,
> >
> > I started a opensource project PyINI for corss-platform *.ini

parsing
> > at http://sourceforge.net/projects/pyini/
> >
> > I have released a simple alpha version, which can read *.ini, with
> > some extended features such as "key=value1,value2,value3". I also
> > made a c++ binding to PyINI with elmer toolkit.

>
>
> The most useful feature would be to be able to write INI files back

without
> affecting their formatting, without removing user commands, etc. This

is what
> Windows APIs do, and it is what I am missing from most INI parsing

libraries
> out there.
> --
> Giovanni Bajo


ConfigObj easily writes back, files but doesn't *yet* support the full
'ini' file spec (empty values and split lines it doesn't yet support).
These are targetted for next release.

What aspects of formatting do you want to keep, and I'll try and
include them ?

http://www.voidspace.org.uk/python/configobj.html

Regards,


Fuzzy
http://www.voidspace.org.uk/python/index.shtml

 
Reply With Quote
 
Peter Maas
Guest
Posts: n/a
 
      02-11-2005
SeSe schrieb:
> I started a opensource project PyINI for corss-platform *.ini parsing at
> http://sourceforge.net/projects/pyini/
>
> I have released a simple alpha version, which can read *.ini, with some
> extended features such as "key=value1,value2,value3". I also made a
> c++ binding to PyINI with elmer toolkit.


I suggest that you have a look at Tim Daneliuk's tconfpy serving a
similar purpose. Perhaps you can join forces.

I'd like to see a configuration tool that for Python programmers
is as easy as config.py, i.e. you you have config object and can
write/read it to/from some storage, e.g.

- .ini files
- Java config files
- xml files
- LDAP server
- win32 registry
- ...

It would be nice to make this not a Python only thing but accessible
by other languages like Perl, Ruby, Java, C/C++ ...

I think that a new config utility is worth the effort if it has the
potential to put an end to roll-your-own config formats and parsers.

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
 
Reply With Quote
 
Nick Coghlan
Guest
Posts: n/a
 
      02-11-2005
Peter Maas wrote:
> I think that a new config utility is worth the effort if it has the
> potential to put an end to roll-your-own config formats and parsers.
>


http://www.python.org/moin/ConfigParserShootout

Cheers,
Nick.

--
Nick Coghlan | http://www.velocityreviews.com/forums/(E-Mail Removed) | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
 
Reply With Quote
 
Giovanni Bajo
Guest
Posts: n/a
 
      02-13-2005
Thomas Heller wrote:

>>> I have released a simple alpha version, which can read *.ini, with
>>> some extended features such as "key=value1,value2,value3". I also
>>> made a c++ binding to PyINI with elmer toolkit.

>>
>>
>> The most useful feature would be to be able to write INI files back
>> without affecting their formatting, without removing user commands,
>> etc. This is what Windows APIs do, and it is what I am missing from
>> most INI parsing libraries out there.

>
> You can easily access the windows apis either with pywin32, or with
> ctypes for those functions that aren't wrapped in pywin32.


Sure, but we were speaking of doing that in a portable library.
--
Giovanni Bajo


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Simple ini Config parser examples needed Tim Chase Python 0 12-03-2008 11:10 AM
Boot.ini not in root? Where is Boot.ini for Win 2000 pro? rosalind8109@nospamrodadrunner.net Computer Support 15 02-03-2007 03:39 AM
.ini file parser (ConfigParser) Ian Bicking Python 0 10-22-2004 04:29 AM
XML Parser VS HTML Parser ZOCOR Java 11 10-05-2004 01:58 PM
XMLparser: Difference between parser.setErrorHandler() vs. parser.setContentHandler() Bernd Oninger Java 0 06-09-2004 01:26 AM



Advertisments