speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

python parser for dotconf file


From: Hemant Goyal
Subject: python parser for dotconf file
Date: Thu, 3 Jul 2008 21:42:35 +0530

Hi Lukas,

I am working on a project to integrate speech-dispatcher (which uses
dot.conf for its configuration files) into the olpc sugar environment. I
need to modify the configuration files directly from a python program,
and unfortunately python bindings of dotconf are not available.

I developed a simple parser to read the parameter values correctly.

I am, however, having trouble deciding how to write back (edit the value of
a particular parameter) to the file - There are times when multiple
instances of the same parameter exist.

For example:

AddModule "flite" "sd_flite" "flite.conf"
#AddModule "espeak-generic" "sd_generic" "espeak-generic.conf"

I have two questions:

   1. Would the dotconf project benefit from a generic python program that
   allows to read/edit parameters within a dotconf file?
   2. How to modify the parameter values when multiple instances of the same
   parameter exist as describred above.

For your reference I am attaching the pyDotconf project that I created.
Please run pyDotconf_test.py to see whats happening.

Thanks and looking forward to your feedback!
Hemant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.freebsoft.org/pipermail/speechd/attachments/20080703/6a87a642/attachment.htm
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyDotconf.tar.gz
Type: application/x-gzip
Size: 5060 bytes
Desc: not available
Url : 
http://lists.freebsoft.org/pipermail/speechd/attachments/20080703/6a87a642/attachment.bin
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]