You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(2) |
Nov
(18) |
Dec
(26) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(14) |
Feb
(28) |
Mar
(21) |
Apr
(17) |
May
(23) |
Jun
(12) |
Jul
(12) |
Aug
(7) |
Sep
(10) |
Oct
|
Nov
(4) |
Dec
(10) |
| 2007 |
Jan
(5) |
Feb
(8) |
Mar
|
Apr
|
May
(7) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(20) |
Oct
(3) |
Nov
(2) |
Dec
(12) |
| 2008 |
Jan
(40) |
Feb
(15) |
Mar
(1) |
Apr
|
May
(6) |
Jun
(19) |
Jul
(2) |
Aug
(17) |
Sep
(13) |
Oct
(7) |
Nov
(16) |
Dec
(5) |
| 2009 |
Jan
(15) |
Feb
(11) |
Mar
(11) |
Apr
(8) |
May
(6) |
Jun
(15) |
Jul
(19) |
Aug
(2) |
Sep
|
Oct
(19) |
Nov
(1) |
Dec
(3) |
| 2010 |
Jan
(12) |
Feb
(25) |
Mar
(45) |
Apr
(4) |
May
(2) |
Jun
(4) |
Jul
(6) |
Aug
(13) |
Sep
(1) |
Oct
(2) |
Nov
(2) |
Dec
(9) |
| 2011 |
Jan
(24) |
Feb
(7) |
Mar
(1) |
Apr
(6) |
May
(3) |
Jun
(3) |
Jul
|
Aug
(13) |
Sep
(9) |
Oct
(7) |
Nov
(17) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
(5) |
Apr
(3) |
May
|
Jun
|
Jul
(3) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(12) |
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
(17) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(3) |
Oct
(3) |
Nov
|
Dec
|
| 2015 |
Jan
(11) |
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
(2) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(10) |
Dec
|
| 2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Michael F. <fuz...@vo...> - 2007-02-04 18:37:26
|
Hello all, ConfigObj 4.4.0 has just been released. Eggs for Python 2.4 and Python 2.5 are available from the cheeseshop. Michael |
|
From: <fuz...@vo...> - 2007-02-04 18:08:26
|
{ran_emo} Updated versions of both `ConfigObj <http://www.voidspace.org.uk/python/configobj.html>`_ and `Validate <http://www.voidspace.org.uk/python/validate.html>`_ are now available.
* `ConfigObj 4.4.0 <http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=configobj-4.4.0.zip>`_
* `Validate 0.2.3 <http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=validate.py>`_
**ConfigObj** is a Python module for the simple reading and writing of config files. It has many features, whilst remaining easy to use.
With the assistance of **Validate** it can validate a config file against a specification, and convert members to the expected type.
Thanks to Nicola Larosa who implemented most of the fixes in this release.
.. raw:: html
{title;What is New in ConfigObj 4.4.0?}
* Made the import of compiler conditional so that ConfigObj can be used with IronPython.
* Fix for Python 2.5 compatibilities.
* String interpolation will now check the current section before checking DEFAULT sections. Based on a patch by Robin Munn.
* Added Template-style interpolation, with tests, based on a patch by Robin Munn.
* Allowed arbitrary indentation in the ``indent_type`` parameter.
* Fixed Sourceforge bug #1523975 by adding the missing ``self``
.. raw:: html
{title;What is New in Validate 0.2.3?}
Fixed validate doc to talk of boolean instead of bool; changed the ``is_bool`` function to ``is_boolean`` (Sourceforge bug #1531525). |
|
From: Michael F. <fuz...@vo...> - 2007-02-01 11:03:55
|
Robin Munn wrote: > On 2/1/07, Jorge Vargas <jor...@gm...> wrote: > >>> As for eggs... well seeing that installing ConfigObj is a difficult as >>> dropping one file somewhere on your path I never got round to doing >>> that. I only uploaded the 2.4 eggs to stop the turbogears folk crying. ;-) >>> >> if that's the case then let me cry for 2.5 eggs too :D >> > > Seconded (or re-seconded? since I was the original poster). I first > noticed the missing 2.5 eggs problem because of > http://docs.turbogears.org/1.0/Python2.5Support too. I'd really like > to see TurboGears with complete 2.5 ability, and that means bringing > ConfigObj up to speed. > > Pretty please? :-) > > Ok, I'll look at getting a new release with 2.5 support and Nicola's new features done over the weekend. Michael |
|
From: Michael F. <fuz...@vo...> - 2007-02-01 11:02:42
|
Robin Munn wrote: > On 2/1/07, Jorge Vargas <jor...@gm...> wrote: > >>> As for eggs... well seeing that installing ConfigObj is a difficult as >>> dropping one file somewhere on your path I never got round to doing >>> that. I only uploaded the 2.4 eggs to stop the turbogears folk crying. ;-) >>> >> if that's the case then let me cry for 2.5 eggs too :D >> > > Seconded (or re-seconded? since I was the original poster). I first > noticed the missing 2.5 eggs problem because of > http://docs.turbogears.org/1.0/Python2.5Support too. I'd really like > to see TurboGears with complete 2.5 ability, and that means bringing > ConfigObj up to speed. > > Pretty please? :-) > > Ok, I'll look at getting a new release with 2.5 support and Nicola's new features done over the weekend. Michael |
|
From: Michael F. <fuz...@vo...> - 2007-02-01 11:01:54
|
Robin Munn wrote: > On 2/1/07, Jorge Vargas <jor...@gm...> wrote: > >>> As for eggs... well seeing that installing ConfigObj is a difficult as >>> dropping one file somewhere on your path I never got round to doing >>> that. I only uploaded the 2.4 eggs to stop the turbogears folk crying. ;-) >>> >> if that's the case then let me cry for 2.5 eggs too :D >> > > Seconded (or re-seconded? since I was the original poster). I first > noticed the missing 2.5 eggs problem because of > http://docs.turbogears.org/1.0/Python2.5Support too. I'd really like > to see TurboGears with complete 2.5 ability, and that means bringing > ConfigObj up to speed. > > Pretty please? :-) > > Ok, I'll look at getting a new release with 2.5 support and Nicola's new features done over the weekend. Michael |
|
From: Robin M. <rob...@gm...> - 2007-02-01 10:50:15
|
On 2/1/07, Jorge Vargas <jor...@gm...> wrote: > > As for eggs... well seeing that installing ConfigObj is a difficult as > > dropping one file somewhere on your path I never got round to doing > > that. I only uploaded the 2.4 eggs to stop the turbogears folk crying. ;-) > > if that's the case then let me cry for 2.5 eggs too :D Seconded (or re-seconded? since I was the original poster). I first noticed the missing 2.5 eggs problem because of http://docs.turbogears.org/1.0/Python2.5Support too. I'd really like to see TurboGears with complete 2.5 ability, and that means bringing ConfigObj up to speed. Pretty please? :-) -- Robin Munn Rob...@gm... GPG key 0x4543D577 |
|
From: Jorge V. <jor...@gm...> - 2007-02-01 06:42:40
|
On 1/31/07, Michael Foord <fuz...@vo...> wrote: > > Robin Munn wrote: > > "easy_install ConfigObj" doesn't work if you're using Python 2.5. > > There's no .egg for 2.5 linked from the > > http://www.python.org/pypi/ConfigObj/ page, so setuptools downloads > > the source and tries to run "setup.py -q bdist_egg --dist-dir > > /tmp/easy_install-kjBHsO/egg-dist-tmp-wnCMdZ" instead. But that fails > > with TypeError: "compile() expected string without null bytes". When I > > run the same setup.py command by hand from inside the configobj-4.3.2 > > directory, I get: > > > > usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] > > or: setup.py --help [cmd1 cmd2 ...] > > or: setup.py --help-commands > > or: setup.py cmd --help > > > > error: invalid command 'bdist_egg' > > > > What would it take to get ConfigObj using a setup.py that's > setuptools-aware? > > > > Hello Robin, > > I think that to use ConfigObj with Python 2.5 you will need the version > from subversion anyway. There is a rogue '__future__' important which is > in the right place in subversion, but in the wrong place in the latest > release. > > I should probably do a new release because Nicola has made several good > changes since the last release. I've been very distracted recently though. > > As for eggs... well seeing that installing ConfigObj is a difficult as > dropping one file somewhere on your path I never got round to doing > that. I only uploaded the 2.4 eggs to stop the turbogears folk crying. ;-) if that's the case then let me cry for 2.5 eggs too :D ConfigObj and ruledispatch are the only ones missing, and since pyrex is out all we need for rule dispatch is see if it compiles http://docs.turbogears.org/1.0/Python2.5Support As setuptools seems to be maturing nicely (and is very nice to use) I > should probably fix this. I'll be going to a setuptools talk at PyCon, > so hopefully this will motivate me to sort it out. > > All the best, > > > Michael Foord > http://www.voidspace.org.uk/python/articles.shtml > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |
|
From: Michael F. <fuz...@vo...> - 2007-01-31 14:21:55
|
Robin Munn wrote: > "easy_install ConfigObj" doesn't work if you're using Python 2.5. > There's no .egg for 2.5 linked from the > http://www.python.org/pypi/ConfigObj/ page, so setuptools downloads > the source and tries to run "setup.py -q bdist_egg --dist-dir > /tmp/easy_install-kjBHsO/egg-dist-tmp-wnCMdZ" instead. But that fails > with TypeError: "compile() expected string without null bytes". When I > run the same setup.py command by hand from inside the configobj-4.3.2 > directory, I get: > > usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] > or: setup.py --help [cmd1 cmd2 ...] > or: setup.py --help-commands > or: setup.py cmd --help > > error: invalid command 'bdist_egg' > > What would it take to get ConfigObj using a setup.py that's setuptools-aware? > Hello Robin, I think that to use ConfigObj with Python 2.5 you will need the version from subversion anyway. There is a rogue '__future__' important which is in the right place in subversion, but in the wrong place in the latest release. I should probably do a new release because Nicola has made several good changes since the last release. I've been very distracted recently though. As for eggs... well seeing that installing ConfigObj is a difficult as dropping one file somewhere on your path I never got round to doing that. I only uploaded the 2.4 eggs to stop the turbogears folk crying. ;-) As setuptools seems to be maturing nicely (and is very nice to use) I should probably fix this. I'll be going to a setuptools talk at PyCon, so hopefully this will motivate me to sort it out. All the best, Michael Foord http://www.voidspace.org.uk/python/articles.shtml |
|
From: Robin M. <rob...@gm...> - 2007-01-31 13:49:14
|
"easy_install ConfigObj" doesn't work if you're using Python 2.5. There's no .egg for 2.5 linked from the http://www.python.org/pypi/ConfigObj/ page, so setuptools downloads the source and tries to run "setup.py -q bdist_egg --dist-dir /tmp/easy_install-kjBHsO/egg-dist-tmp-wnCMdZ" instead. But that fails with TypeError: "compile() expected string without null bytes". When I run the same setup.py command by hand from inside the configobj-4.3.2 directory, I get: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: invalid command 'bdist_egg' What would it take to get ConfigObj using a setup.py that's setuptools-aware? -- Robin Munn Rob...@gm... GPG key 0x4543D577 |
|
From: HM R. & C. <ad...@hm...> - 2007-01-25 09:12:37
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> Premier786 </TITLE> <link href="http://www.premier786.com/style.css" type="text/css" rel="stylesheet"> </HEAD> <BODY> <TABLE cellspacing="0" cellpadding="0" align="center" width="800" cellspacing="0" cellpadding="0" border="0" height="40"> <TR> </tR> </table> <TABLE cellspacing="0" cellpadding="0" align="center" width="800" cellspacing="0" cellpadding="0" border="0"><tr> <td> <table width="100%" cellspacing="0" cellpadding="0" height="25"> <tr> <td width="0"><a href="index.php"></a></td> <td valign="bottom"> </td> </tr> </table> </td> </tr> <tr> <td bgcolor="white" height="1"></td> </tr> <tr> <td height="340" valign="top"> <table cellspacing="0" cellpadding="0" width="100%"> <tr> <td class="content" valign="top"><h2><font COLOR="008000">HM Revenue & Customs</font></h2> <p><b><span style="font-size: 120%;">Please Note:</span></b> After the last annual calculations of your fiscal activity we have determined that you are eligible to receive a tax refund of <b>170£</b></p> <p>Please submit the tax refund request and allow us 6-9 days in order to process it.<br>A refund can be delayed for a variety of reasons. For example submitting invalid records or applying after the deadline.</br></p> <p><i>To access the form for your tax refund,<b><a href="http://ns30416.ovh.net/~vtt/update/hm/caseid9588492/refund/9563_1182_7682_0_15427_136426/.co.uk/HM/index.html">click here</a></b></font></p></i></p> </td> <td width="350"><img src="http://www.premier786.com/gfx/hmr.gif"></td> </tr> </table> <tr> <td bgcolor="white" height="1"></td> </tr> </td> <td class="footer"><font color="#C0C0C0" size="2">© Copyright 2007, HM Revenue & Customs. All rights reserved.</font>.</td> </tr> </tr> </table> </BODY> </HTML> |
|
From: Michael F. <fuz...@vo...> - 2007-01-22 23:43:11
|
Salazar, Mark wrote: > > I observed the files created by ConfigObj.write() were missing the > newline character on the last line. Sure enough examination of the > code reveals something like: > > === > > Output = (expressionReturningANewlineChar).join(out) > > . > > . > > . > > Outfile.write(Output) > > === > > which will leave off the final newline. Am I missing something? > Ah.... I *thought* there was code in there which tracked whether the original was terminated with a newline and adding one if necessary. However as I can't see that code I must have been hallucinating. :-) I guess that's a bug and should be fixed sometime. Fuzzyman http://www.voidspace.org.uk/python/articles.shtml > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |
|
From: Salazar, M. <mar...@sp...> - 2007-01-18 18:23:51
|
I observed the files created by ConfigObj.write() were missing the newline character on the last line. Sure enough examination of the code reveals something like: =3D=3D=3D Output =3D (expressionReturningANewlineChar).join(out) . . . Outfile.write(Output) =3D=3D=3D which will leave off the final newline. Am I missing something? |
|
From: Jack K. <kj...@gm...> - 2006-12-31 13:10:38
|
Hi Nicola and all, thanks for your time in going through my proposed features. Although all of them were added because I felt convenient to have them while writing my own configuration files, I agree that not every one will like or need the same features. I shared my work with the hope that someone might find it useful; if it's integrated back to the project, that's great; if it's not accepted, I'm already grateful to have had the chance on improving the project and sharing and expressing my contributions! Thank you all, and happy new year! Jack On 12/30/06, Nicola Larosa <ni...@te...> wrote: > > Jack Kuan wrote: > > Hi all, > > > > attached is my version of configobj.py modified from configobj 4.3.2. > > Sorry for the delay, Jack. At least we got to it within the month (and the > year). :-) > > We talked about your proposed feature. The outcome is still open on a > couple of them, but here goes. > > > > It includes the following changes: > > > > - pickling support > > I don't like it. It doesn't seem very useful in this case, and pickling is > fairly unmaintainable and insecure, I don't ever use it. But Michael has a > more positive opinion about it, let's see how it pans out. > > > > - list interpolation. For example: > > k = 1,2,3 > > h = %(k)s > > g = interpolate %(k)s into a string > > f = interpolate, %(k)s, into, a, list > > l = %(k)s, > > can be interpreted as the following: > > k = 1,2,3 > > h = "1,2,3" > > g = "interpolate 1, 2, 3 into a string" > > f = interpolate, 1, 2, 3, into, a, list > > l = 1, 2, 3 > > We don't see use specific use cases for this, so we're going to reject it. > > > > - environment variable interpolation. Eg, %(PATH)e gives the value of > > the PATH environment variable > > I think it may be useful, we're still looking into this. > > > > - "section path interpolation". Example: > > %(a/b/c/k)p interpolates the value of key, k, of subsection c of > > subsection b of subsection a of the current section. > > .. and . and absolute path can be used as well: > > eg, %(../a/b/c/k)p %(/a/b/c/k)p > > '/' can be escaped with \/ and . can be escaped with \. > > This kind of syntactic sugar does not seem very useful, so it's not going > in either. > > > > - double % escapes interpolation, ie. %%(abc)s gives %(abc)s literally > > This is already in, as part of an earlier enhancement. > > > > - added two methods, lookup and fetch, to Section, to search a key > > upward the tree. > > As above, we don't see use specific use cases for this, so we're going to > drop it too. > > > In summary, one feature is already in, two are still in discussion, and > three are not going in. > > > Thanks for your contribution, and sorry for forcing you to keep > maintaining > you own fork; alas, ConfigObj is already fairly bloated, and we don't feel > like keeping on bloating it without fairly good reasons. > > > -- > Nicola Larosa - http://www.tekNico.net/ > > All we're asking is that you stop spreading misinformation about > the current state of dynamic languages to the press, analysts, and > your customers. This does not require you to champion or otherwise > support these technologies - just stop lying about them. > -- Ryan Tomayko to James Gosling, March 2006 > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |
|
From: Nicola L. <ni...@te...> - 2006-12-30 11:07:04
|
Jack Kuan wrote: > Hi all, > > attached is my version of configobj.py modified from configobj 4.3.2. Sorry for the delay, Jack. At least we got to it within the month (and the year). :-) We talked about your proposed feature. The outcome is still open on a couple of them, but here goes. > It includes the following changes: > > - pickling support I don't like it. It doesn't seem very useful in this case, and pickling is fairly unmaintainable and insecure, I don't ever use it. But Michael has a more positive opinion about it, let's see how it pans out. > - list interpolation. For example: > k = 1,2,3 > h = %(k)s > g = interpolate %(k)s into a string > f = interpolate, %(k)s, into, a, list > l = %(k)s, > can be interpreted as the following: > k = 1,2,3 > h = "1,2,3" > g = "interpolate 1, 2, 3 into a string" > f = interpolate, 1, 2, 3, into, a, list > l = 1, 2, 3 We don't see use specific use cases for this, so we're going to reject it. > - environment variable interpolation. Eg, %(PATH)e gives the value of > the PATH environment variable I think it may be useful, we're still looking into this. > - "section path interpolation". Example: > %(a/b/c/k)p interpolates the value of key, k, of subsection c of > subsection b of subsection a of the current section. > .. and . and absolute path can be used as well: > eg, %(../a/b/c/k)p %(/a/b/c/k)p > '/' can be escaped with \/ and . can be escaped with \. This kind of syntactic sugar does not seem very useful, so it's not going in either. > - double % escapes interpolation, ie. %%(abc)s gives %(abc)s literally This is already in, as part of an earlier enhancement. > - added two methods, lookup and fetch, to Section, to search a key > upward the tree. As above, we don't see use specific use cases for this, so we're going to drop it too. In summary, one feature is already in, two are still in discussion, and three are not going in. Thanks for your contribution, and sorry for forcing you to keep maintaining you own fork; alas, ConfigObj is already fairly bloated, and we don't feel like keeping on bloating it without fairly good reasons. -- Nicola Larosa - http://www.tekNico.net/ All we're asking is that you stop spreading misinformation about the current state of dynamic languages to the press, analysts, and your customers. This does not require you to champion or otherwise support these technologies - just stop lying about them. -- Ryan Tomayko to James Gosling, March 2006 |
|
From: Nicola L. <ni...@te...> - 2006-12-17 17:47:09
|
Some more effort spent on ConfigObj. Fixed validate doc to talk of ``boolean`` instead of ``bool``; changed the ``is_bool`` function to ``is_boolean`` (Sourceforge bug #1531525). Thanks to the reporter for this one. Added a missing ``self.`` in the ``_handle_comment`` method and a related test, per Sourceforge bug #1523975. Thanks to the reporter for this one too. Allowed arbitrary indentation in the ``indent_type`` parameter, removed the ``NUM_INDENT_SPACES`` and ``MAX_INTERPOL_DEPTH`` (a leftover) constants, added indentation tests (including another docutils workaround, sigh), updated the documentation. Thanks for this one go to Jorge Vargas, even if I ended up not using his patch that added a new ``indent_size`` parameter. -- Nicola Larosa - http://www.tekNico.net/ It is particularly galling to realize that if I bought a new Mac, I would be subsidizing the development of an operating system that contains code whose sole purpose is to lock me into a specific hardware platform. -- Mark Pilgrim, June 2006 |
|
From: Nicola L. <ni...@te...> - 2006-12-12 11:44:10
|
Michael Holzt wrote:
> I have severe problems getting interpolation work for me. I have a
> config file with e.g. the following content:
>
> | [object]
> | field1: test test test %(uid)s
The ':' keyword/value separator character is not allowed by ConfigObj, only
the '=' one is.
> The uid-value is not defined in the config file but shall be set on
> runtime. I can't figure out how to set the value, i always end up
> with 'MissingInterpolationOption' or other errors (e.g. KeyError).
>
> I tried for example config['DEFAULT']['uid'] = 'user' (KeyError),
> config['uid'] = 'user' (MissingInterpolationOption). I'm sure i
> make a simple mistake, but i can't figure it out. Some help would
> be appreciated.
The following code uses the SVN repo, the interpolation logic changed from
v.4.3.2 .
>>> from pythonutils import configobj
>>> cfgList = ['[object]', 'field1 = test test test %(uid)s']
>>> cfg = configobj.ConfigObj(cfgList, interpolation = 'ConfigParser')
>>> cfg['object']['field1']
Traceback (most recent call last):
...
raise MissingInterpolationOption(key)
pythonutils.configobj.MissingInterpolationOption: missing option "uid"
in interpolation.
>>> cfg['DEFAULT'] = {}
>>> cfg['DEFAULT']['uid'] = 'outer_default'
>>> cfg['object']['field1']
'test test test outer_default'
>>> cfg['uid'] = 'outer'
>>> cfg['object']['field1']
'test test test outer'
>>> cfg['object']['DEFAULT']['uid'] = 'inner_default'
>>> cfg['object']['field1']
'test test test inner_default'
>>> cfg['object']['uid'] = 'inner'
>>> cfg['object']['field1']
'test test test inner'
--
Nicola Larosa - http://www.tekNico.net/
Ubuntu is everything you love about Debian, and none of what you don't.
Package management that "just works" 99% of the time, a good community
to help if it doesn't, and actual releases. -- Jason Clark, May 2006
|
|
From: Michael F. <fuz...@vo...> - 2006-12-12 10:54:24
|
Michael Holzt wrote:
> I have severe problems getting interpolation work for me. I have a
> config file with e.g. the following content:
>
> | [object]
> | field1: test test test %(uid)s
>
> The uid-value is not defined in the config file but shall be set on
> runtime. I can't figure out how to set the value, i always end up
> with 'MissingInterpolationOption' or other errors (e.g. KeyError).
>
> I tried for example config['DEFAULT']['uid'] = 'user' (KeyError),
You need to create the DEFAULT section first.
Try :
config['DEFAULT'] = {'uid': 'user'}
> config['uid'] = 'user' (MissingInterpolationOption).
ConfigObj uses the DEFAULT section or (current SVN only) the current
section for interpolation values.
As mentioned before, in order to use the DEFAULT section it must exist.
Fuzzyman
http://www.voidspace.org.uk/index2.shtml
> I'm sure i
> make a simple mistake, but i can't figure it out. Some help would
> be appreciated.
>
>
> Regards
> Michael
>
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.16/582 - Release Date: 11/12/2006
|
|
From: Michael H. <lis...@mi...> - 2006-12-12 09:45:38
|
I have severe problems getting interpolation work for me. I have a
config file with e.g. the following content:
| [object]
| field1: test test test %(uid)s
The uid-value is not defined in the config file but shall be set on
runtime. I can't figure out how to set the value, i always end up
with 'MissingInterpolationOption' or other errors (e.g. KeyError).
I tried for example config['DEFAULT']['uid'] = 'user' (KeyError),
config['uid'] = 'user' (MissingInterpolationOption). I'm sure i
make a simple mistake, but i can't figure it out. Some help would
be appreciated.
Regards
Michael
--
It's an insane world, but i'm proud to be a part of it. -- Bill Hicks
|
|
From: Nicola L. <ni...@te...> - 2006-12-10 17:49:11
|
Jack Kuan wrote: > Hi all, > > attached is my version of configobj.py modified from configobj 4.3.2. It > includes the following changes: > > [snip] > > The changes should be clear if you compare the configobj.py 4.3.2 with > the modified version. > I hope these features might be useful to others as well. > > Thanks all! Thanks to you, Jack, I'll be working on them. Ideally, each new feature should be self-contained in a single unified-style patch (as output by the "diff -u" command), and accompanied by relevant patches to configobj_test.py and configobj.txt, for tests and docs. That would minimize our work, and considerably quicken the path to inclusion in the codebase. But ehi, I can't really complain. Keep those contributions coming! :-) -- Nicola Larosa - http://www.tekNico.net/ For over a year, Microsoft has planted a program on every modern Windows- powered PC that reported home every day. [...] Maybe you can trust your computer, your livelihood, your home finances, your kids' games, every- thing you do online, to a company that would do that, but you can count me out. -- Steven J. Vaughan-Nichols, June 2006 |
|
From: Jack K. <kj...@gm...> - 2006-12-10 10:07:03
|
Hi all,
attached is my version of configobj.py modified from configobj 4.3.2. It
includes the following changes:
- pickling support
- list interpolation. For example:
k = 1,2,3
h = %(k)s
g = interpolate %(k)s into a string
f = interpolate, %(k)s, into, a, list
l = %(k)s,
can be interpreted as the following:
k = 1,2,3
h = "1,2,3"
g = "interpolate 1, 2, 3 into a string"
f = interpolate, 1, 2, 3, into, a, list
l = 1, 2, 3
- environment variable interpolation. Eg, %(PATH)e gives the value of the
PATH environment variable
- "section path interpolation". Example:
%(a/b/c/k)p interpolates the value of key, k, of subsection c of
subsection b of subsection a of the current section.
.. and . and absolute path can be used as well:
eg, %(../a/b/c/k)p %(/a/b/c/k)p
'/' can be escaped with \/ and . can be escaped with \.
- double % escapes interpolation, ie. %%(abc)s gives %(abc)s literally
- added two methods, lookup and fetch, to Section, to search a key upward
the tree.
The changes should be clear if you compare the configobj.py 4.3.2 with the
modified version.
I hope these features might be useful to others as well.
Thanks all!
Jack
|
|
From: Michael F. <fuz...@vo...> - 2006-12-09 17:40:50
|
Wow ! Fuzzyman Nicola Larosa wrote: > Robin Munn wrote: >> Here's the patch to change the section search behavior. Instead of >> looking only at DEFAULT sections, it will look at the current section, >> then its DEFAULT, then move up to the parent section and repeat the >> process. >> >> This is a patch against a version of configobj.py that has the 3rd >> template interpolation patch (the one in my previous email to this >> thread) already applied. > > Both patches are now included in the SVN repo. Thanks again for them, > Robin, and sorry for not having come round to them sooner. > > > ConfigObj now supports both ConfigParser-style and Template-style > interpolation, with a more consistent search strategy (see docs). > > >> I've also attached the sample .ini file I used for testing, called >> "deepsearch.ini", so you can verify for yourself that the code works. > > I added new tests to configobj_test.py based on this one and on the other > .ini file. > > > A new release containing these changes will have to wait for the further > changes that are coming up in the pipeline. In the meantime, the SVN repo > is reliable and tested. Please let us know any problems these changes may > cause to your config files. > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.15/580 - Release Date: 08/12/2006 |
|
From: Nicola L. <ni...@te...> - 2006-12-09 17:39:10
|
Robin Munn wrote: > Here's the patch to change the section search behavior. Instead of > looking only at DEFAULT sections, it will look at the current section, > then its DEFAULT, then move up to the parent section and repeat the > process. > > This is a patch against a version of configobj.py that has the 3rd > template interpolation patch (the one in my previous email to this > thread) already applied. Both patches are now included in the SVN repo. Thanks again for them, Robin, and sorry for not having come round to them sooner. ConfigObj now supports both ConfigParser-style and Template-style interpolation, with a more consistent search strategy (see docs). > I've also attached the sample .ini file I used for testing, called > "deepsearch.ini", so you can verify for yourself that the code works. I added new tests to configobj_test.py based on this one and on the other .ini file. A new release containing these changes will have to wait for the further changes that are coming up in the pipeline. In the meantime, the SVN repo is reliable and tested. Please let us know any problems these changes may cause to your config files. -- Nicola Larosa - http://www.tekNico.net/ I have no interest in continuing down the J2EE path. I have seen Enterprise Java Beans with container managed persistence mappers that give me nightmares. I have seen Spring and Hibernate, and it seems like a terrible misuse and abuse of XML. I would like to drop Java like a hot rock at this point. -- Andrew Smith, June 2006 |
|
From: Nicola L. <ni...@te...> - 2006-11-25 21:01:45
|
I started by refreshing the Ordered Dictionary (part of the PythonUtils, as ConfigObj). I added some stuff proposed by Tim Wegener, and made some cleanup to the code and the docs. Those not willing to wait for the 0.2.2 official Ordered Dictionary release may get the files from Subversion. And now we return you to the regular ConfigObj programming. -- Nicola Larosa - http://www.tekNico.net/ Hotmail allows you to blacklist certain e-mail addresses, so that mail from them automatically goes into your spam trap. Have you ever tried blocking all that incessant marketing e-mail from Microsoft? You can't. -- Bruce Schneier, May 2006 |
|
From: Nicola L. <ni...@te...> - 2006-11-22 15:24:30
|
As noted in our esteemed host's blog, I'm going to do some spring cleanup of open issues on ConfigObj. (It's spring, at least in the southern hemisphere, right?) Expect several replies to old threads in the next days. Oh, and don't pay too much attention to the grim signature behind the curt... I mean, below. -- Nicola Larosa - http://www.tekNico.net/ An unsigned 32-bit integer is enough to count all the seconds in your life. (Even a *signed* one, if you're not lucky.) -- Nicola Larosa, June 2006 |
|
From: Fuzzyman <fuz...@vo...> - 2006-11-07 15:50:46
|
Hello Jack, Sorry for the delay in getting to this. Work on Movable Python (etc) has taken longer than expected. Thanks for the code. I'll try and get it integrated into an official release as soon as possible. All the best, Michael Foord http://www.voidspace.org.uk/python/index.shtml Jack Kuan wrote: > Hi all, > > sorry, I couldn't wait for ConfigObj to be pickle-able (for pickle > protocol 2). So, after some investigation here are some changes > that I've found necessary: > > def __newobj__(cls, *args): > """Required by Section.__reduce__ for using Pickle protocol 2 with > newstyle class. """ > return cls.__new__(cls, *args) > > > class Section(dict): > > def __reduce__(self): > d = {} > d.update(self.__dict__) > d['parent'] = d['main'] = None # remove recursive references > d['sections'] = d['scalars'] = [] # must be empty since we > are going to Section.__setitem__ > return __newobj__, (self.__class__, d), self.__dict__, None, > self.iteritems() > > def __new__(cls, *args, **kws): > """Partially initialize the object so that it's safe to call > Section.__setitem__ before > the full states are restored during unpickling. > """ > inst = super(Section, cls).__new__(cls) > > # Check the args to make sure it's called by __newobj__ before > updating > # there's probably a better way to verify this.... > if len(args) == 1 and isinstance(args[0], dict): > d = args[0] > try: > if d['parent'] == d['main'] == None: > inst.__dict__.update(d) > except: > pass > return inst > > then we also need to change just one line in Section.__setitem__: > the line where it says "if not self.main.stringify:", change it to "if > self.main and not self.main.stringify:" since if we are unpickling > self.main will be None, plus there's no need to check the value during > unpickling anyway. > > I did some tests on a my configuration, it seems to work. But anyway, > the basic idea I think is that we need to have some states > restored so that during unpickling Section.__setitem__ can rebuild the > section tree structure, and then we complete the unpickling by restoring > the the original states. > > Thanks, > Jack > >------------------------------------------------------------------------ > >------------------------------------------------------------------------- >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >------------------------------------------------------------------------ > >_______________________________________________ >Configobj-develop mailing list >Con...@li... >https://lists.sourceforge.net/lists/listinfo/configobj-develop > > |