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-09-24 19:27:33
|
Paul Jimenez wrote: > Hi guys, > > Thought you might appreciate knowing one use of ConfigObj: > http://software.place.org/mhi . Thanks for all your hard work! > (and I probably need to upgrade the version I'm using, come > to think of it) > Cool - thanks. :-) Michael > --pj > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > |
|
From: Paul J. <pj...@pl...> - 2007-09-24 19:14:56
|
Hi guys, Thought you might appreciate knowing one use of ConfigObj: http://software.place.org/mhi . Thanks for all your hard work! (and I probably need to upgrade the version I'm using, come to think of it) --pj |
|
From: Michael F. <fuz...@vo...> - 2007-09-23 13:16:22
|
Sandro Dutra wrote:
> I've read all the documentation searching for this, and sure, I find on
> the item 15.1 this:
>
> 1. The only valid divider is '='.
> 2. ';' is no longer valid for comments, and no multiline comments.
>
> My problem is, I need my program to read and write on a ini format that
> uses ':' as divider and ';' as comment mark. So I want to know if the
> ConfigObj has no method to set those variables like:
>
> from configobj import ConfigObj
> config = ConfigObj()
> # Setting the divider and comment mark (example)
> config.divider = ":"
> config.comment = ";"
>
> If doesn't have it, please, how I can modify it? 'cause I really need to
> change it.
>
Hello Sandro,
As you have noticed, ConfigObj deliberately doesn't support these features.
You should be able to switch over the dividers and comment markers that
ConfigObj allows by changing the regular expressions it uses for parsing.
The regexes are class attributes of the ConfigObj class. Unfortunately
you probably need to modify all of them. This should be quite easy though.
There is also a line in the parser that detects lines that start with a
comment, line 1428:
if not sline or sline.startswith('#'):
As far as I can tell, that is all that needs to change.
All the best,
Michael Foord
http://www.manning.com/foord
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Configobj-develop mailing list
> Con...@li...
> https://lists.sourceforge.net/lists/listinfo/configobj-develop
>
>
>
|
|
From: Sandro D. <he...@gm...> - 2007-09-20 02:07:25
|
I've read all the documentation searching for this, and sure, I find on the item 15.1 this: 1. The only valid divider is '='. 2. ';' is no longer valid for comments, and no multiline comments. My problem is, I need my program to read and write on a ini format that uses ':' as divider and ';' as comment mark. So I want to know if the ConfigObj has no method to set those variables like: from configobj import ConfigObj config = ConfigObj() # Setting the divider and comment mark (example) config.divider = ":" config.comment = ";" If doesn't have it, please, how I can modify it? 'cause I really need to change it. |
|
From: Michael F. <fuz...@vo...> - 2007-09-17 19:41:40
|
Pettit, Keith (SAIC) wrote: > > Is there a way to set items to be case insensitive? Would be nice to > make it so the following are all the same: > > Test1 = "fooo" > test1 = "fooo" > TeSt1 = "fooo" > > Right now I'm taking the manual approch and doing a value.lower() type > of thing with the dict items but it would be nicer if that was a > option inside of configobj itself. > Hehe :-) The Python world tends to be sensitive about case sensitivity... The last version of ConfigObj (version 3) had case insensitivity, but it wasn't a feature much used or liked. As with other feature requests, I'm afraid it is a case of 'patches welcomed'. This would complicate the parser *and* key fetching / setting (i.e. just about everything). If it could be done cleanly *I* wouldn't be particularly opposed to it though (others may have more to say). Michael http://www.manning.com/foord > Thanks, > > Keith > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > ------------------------------------------------------------------------ > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |
|
From: Pettit, K. (SAIC) <Kei...@bp...> - 2007-09-17 16:02:26
|
Is there a way to set items to be case insensitive? Would be nice to make it so the following are all the same: Test1 =3D "fooo" test1 =3D "fooo" TeSt1 =3D "fooo" Right now I'm taking the manual approch and doing a value.lower() type of thing with the dict items but it would be nicer if that was a option inside of configobj itself. Thanks, Keith |
|
From: Michael F. <fuz...@vo...> - 2007-09-13 19:40:16
|
Pettit, Keith (SAIC) wrote: > Got ya. I'm pretty sure I'll have to hack through something to make it happen but I do have a suggestion for development that would help with this. > > > The "merge" command would be perfect if in a future version it could allow for these type of options in the config. > > foo1 = bar #Normal Way > foo2 == bar #Makes it immutable so a merge would still use this value > foo3 += bar #Prepends option in merge > foo4 += bar #Appends option in merge > > Of course the ==,+=,=+ would only matter if your were doing a "merge" but it would be very useful I'd imagine. > These do sound like useful and interesting additions to ConfigObj, but they also sound like work to implement! (Changes to the core parser.) Patches welcomed of course... All the best, Michael Foord http://www.manning.com/foord > Thanks, > > Keith > > > -----Original Message----- > From: con...@li... on behalf of Michael Foord > Sent: Thu 9/13/2007 12:57 PM > To: con...@li... > Subject: Re: [Configobj-develop] [python] Multiple layers of config files help > > Pettit, Keith (SAIC) wrote: > >> I'm working on a app that has multiple levels of configuration. I'm a newbie with configobj so I want to see if there is a better way to do this that what I'm thinking of. >> >> The levels of configs I need to have: >> >> Global - I'm using a spec file to set global values >> Site - Site level >> User - User level options >> Project - Project level options >> CLI - I'm using optparse right now >> >> With my options it goes top down starting from global, ending at Project now until I can figure out how to integrate with optparse. Here is the problem I need to solve with configobj: >> >> * I need the ability to set any of my [key] values as immutable in any of the config files from Global to Project. So I need to give the ability in the Global, Site, User, and Project config's to set any of the [key] values as immutable, which would means the config's below that can't change the value that was just set. >> >> * I need the ability to set whether a list or string in the config can be appended or reset by the next config in the line. >> >> * As a end result I need a final config after it has gone through the Global, Site, User, Project, options as well as obeyed the rules from the two above options I'd like to set. >> >> > > Hello Keith, > > Sorry for the late reply, I've been 'conferencing' for the last week. > All conferenced out now. > > ConfigObj doesn't have any native support for the sort of thing you are > asking, *except* that you can 'merge' configobj instances over the top > of one another. > > The usual way to handle this sort of thing is to start with your > defaults and then merge the user ones over the top. > > This doesn't handle your requirements for sometimes restricting what can > be overridden and what can't. In this case I suggest you do your own > 'validation' type steps in between merging, working out which values you > want to protect and then restoring them after the merge. > > I hope this helps. > > All the best, > > > Michael Foord > http://www.manning.com/foord > > >> Any suggestions or help on how to do this would be appreciated. >> >> Thanks, >> >> Keith >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Configobj-develop mailing list >> Con...@li... >> https://lists.sourceforge.net/lists/listinfo/configobj-develop >> >> >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > |
|
From: Pettit, K. (SAIC) <Kei...@bp...> - 2007-09-13 18:13:04
|
Got ya. I'm pretty sure I'll have to hack through something to make it = happen but I do have a suggestion for development that would help with = this. The "merge" command would be perfect if in a future version it could = allow for these type of options in the config. foo1 =3D bar #Normal Way foo2 =3D=3D bar #Makes it immutable so a merge would still use this = value foo3 +=3D bar #Prepends option in merge foo4 +=3D bar #Appends option in merge Of course the =3D=3D,+=3D,=3D+ would only matter if your were doing a = "merge" but it would be very useful I'd imagine. Thanks, Keith -----Original Message----- From: con...@li... on behalf of = Michael Foord Sent: Thu 9/13/2007 12:57 PM To: con...@li... Subject: Re: [Configobj-develop] [python] Multiple layers of config = files help =20 Pettit, Keith (SAIC) wrote: > I'm working on a app that has multiple levels of configuration. I'm a = newbie with configobj so I want to see if there is a better way to do = this that what I'm thinking of. > > The levels of configs I need to have: > > Global - I'm using a spec file to set global values > Site - Site level > User - User level options > Project - Project level options > CLI - I'm using optparse right now > > With my options it goes top down starting from global, ending at = Project now until I can figure out how to integrate with optparse. Here = is the problem I need to solve with configobj: > > * I need the ability to set any of my [key] values as immutable in any = of the config files from Global to Project. So I need to give the = ability in the Global, Site, User, and Project config's to set any of = the [key] values as immutable, which would means the config's below that = can't change the value that was just set. > > * I need the ability to set whether a list or string in the config can = be appended or reset by the next config in the line. > > * As a end result I need a final config after it has gone through the = Global, Site, User, Project, options as well as obeyed the rules from = the two above options I'd like to set. > =20 Hello Keith, Sorry for the late reply, I've been 'conferencing' for the last week.=20 All conferenced out now. ConfigObj doesn't have any native support for the sort of thing you are=20 asking, *except* that you can 'merge' configobj instances over the top=20 of one another. The usual way to handle this sort of thing is to start with your=20 defaults and then merge the user ones over the top. This doesn't handle your requirements for sometimes restricting what can = be overridden and what can't. In this case I suggest you do your own=20 'validation' type steps in between merging, working out which values you = want to protect and then restoring them after the merge. I hope this helps. All the best, Michael Foord http://www.manning.com/foord > > Any suggestions or help on how to do this would be appreciated. > > Thanks, > > Keith > > = -------------------------------------------------------------------------= > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > =20 -------------------------------------------------------------------------= This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Configobj-develop mailing list Con...@li... https://lists.sourceforge.net/lists/listinfo/configobj-develop |
|
From: Michael F. <mi...@vo...> - 2007-09-13 17:59:41
|
Pettit, Keith (SAIC) wrote: > I'm working on a app that has multiple levels of configuration. I'm a newbie with configobj so I want to see if there is a better way to do this that what I'm thinking of. > > The levels of configs I need to have: > > Global - I'm using a spec file to set global values > Site - Site level > User - User level options > Project - Project level options > CLI - I'm using optparse right now > > With my options it goes top down starting from global, ending at Project now until I can figure out how to integrate with optparse. Here is the problem I need to solve with configobj: > > * I need the ability to set any of my [key] values as immutable in any of the config files from Global to Project. So I need to give the ability in the Global, Site, User, and Project config's to set any of the [key] values as immutable, which would means the config's below that can't change the value that was just set. > > * I need the ability to set whether a list or string in the config can be appended or reset by the next config in the line. > > * As a end result I need a final config after it has gone through the Global, Site, User, Project, options as well as obeyed the rules from the two above options I'd like to set. > Hello Keith, Sorry for the late reply, I've been 'conferencing' for the last week. All conferenced out now. ConfigObj doesn't have any native support for the sort of thing you are asking, *except* that you can 'merge' configobj instances over the top of one another. The usual way to handle this sort of thing is to start with your defaults and then merge the user ones over the top. This doesn't handle your requirements for sometimes restricting what can be overridden and what can't. In this case I suggest you do your own 'validation' type steps in between merging, working out which values you want to protect and then restoring them after the merge. I hope this helps. All the best, Michael Foord http://www.manning.com/foord > > Any suggestions or help on how to do this would be appreciated. > > Thanks, > > Keith > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > |
|
From: Pettit, K. (SAIC) <Kei...@bp...> - 2007-09-12 19:51:48
|
I'm working on a app that has multiple levels of configuration. I'm a = newbie with configobj so I want to see if there is a better way to do = this that what I'm thinking of. The levels of configs I need to have: Global - I'm using a spec file to set global values Site - Site level User - User level options Project - Project level options CLI - I'm using optparse right now With my options it goes top down starting from global, ending at Project = now until I can figure out how to integrate with optparse. Here is the = problem I need to solve with configobj: * I need the ability to set any of my [key] values as immutable in any = of the config files from Global to Project. So I need to give the = ability in the Global, Site, User, and Project config's to set any of = the [key] values as immutable, which would means the config's below that = can't change the value that was just set. * I need the ability to set whether a list or string in the config can = be appended or reset by the next config in the line. * As a end result I need a final config after it has gone through the = Global, Site, User, Project, options as well as obeyed the rules from = the two above options I'd like to set. Any suggestions or help on how to do this would be appreciated. Thanks, Keith |
|
From: Arve K. <arv...@gm...> - 2007-08-22 21:34:04
|
On 8/22/07, Michael Foord <fuz...@vo...> wrote: > > Arve Knudsen wrote: > > Just checking if anything is being done about this issue? > > I'm afraid I haven't had a chance to look at this yet. :-( > > It is still 'on my list' though, and everything does get done > eventually... OK. Arve > > > Arve > > > > On 5/16/07, *Michael Foord* <ar...@vo... > > <mailto:ar...@vo...>> wrote: > > > > Nicola Larosa wrote: > > > Michael Foord wrote: > > > > > >>> I would like this behaviour, otherwise the validation should > > raise an > > >>> error instead of silently returning a string when a list was > > specified > > >>> in the validation schema. > > >>> > > > > > > > > >> Thanks Arve - I'll look at this. Anyone else have an opinion on > > the > > >> 'raise an error or coerce to list' question ? > > >> > > > > > > I don't need to remind you the timeless lesson of the ages > > before us: ;-) > > > > > > "Explicit is better than implicit. > > > ... > > > Errors should never pass silently. > > > Unless explicitly silenced. > > > In the face of ambiguity, refuse the temptation to guess." > > > > > > There is an ambiguity in *meaning* here, so definitely raise an > > error. > > > > > I'm still slightly reluctant, if the entry is meant to be a list > > then a > > single entry is valid and we're debating syntax. > > > > On the other hand there *is* a potential cause for confusion - so at > > least an error will signal where the problem is. I think this is > > probably the right thing to do. > > > > There is possibly also an issue with empty values and empty lists > > as well. > > > > I'll look into it. > > > > Michael > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Configobj-develop mailing list > > Con...@li... > > <mailto:Con...@li...> > > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Configobj-develop mailing list > > Con...@li... > > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |
|
From: Michael F. <fuz...@vo...> - 2007-08-22 20:58:57
|
Arve Knudsen wrote: > Just checking if anything is being done about this issue? I'm afraid I haven't had a chance to look at this yet. :-( It is still 'on my list' though, and everything does get done eventually... Michael > > Arve > > On 5/16/07, *Michael Foord* <ar...@vo... > <mailto:ar...@vo...>> wrote: > > Nicola Larosa wrote: > > Michael Foord wrote: > > > >>> I would like this behaviour, otherwise the validation should > raise an > >>> error instead of silently returning a string when a list was > specified > >>> in the validation schema. > >>> > > > > > >> Thanks Arve - I'll look at this. Anyone else have an opinion on > the > >> 'raise an error or coerce to list' question ? > >> > > > > I don't need to remind you the timeless lesson of the ages > before us: ;-) > > > > "Explicit is better than implicit. > > ... > > Errors should never pass silently. > > Unless explicitly silenced. > > In the face of ambiguity, refuse the temptation to guess." > > > > There is an ambiguity in *meaning* here, so definitely raise an > error. > > > I'm still slightly reluctant, if the entry is meant to be a list > then a > single entry is valid and we're debating syntax. > > On the other hand there *is* a potential cause for confusion - so at > least an error will signal where the problem is. I think this is > probably the right thing to do. > > There is possibly also an issue with empty values and empty lists > as well. > > I'll look into it. > > Michael > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > <mailto:Con...@li...> > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ------------------------------------------------------------------------ > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |
|
From: Arve K. <arv...@gm...> - 2007-08-22 19:09:15
|
Just checking if anything is being done about this issue? Arve On 5/16/07, Michael Foord <ar...@vo...> wrote: > > Nicola Larosa wrote: > > Michael Foord wrote: > > > >>> I would like this behaviour, otherwise the validation should raise an > >>> error instead of silently returning a string when a list was specified > >>> in the validation schema. > >>> > > > > > >> Thanks Arve - I'll look at this. Anyone else have an opinion on the > >> 'raise an error or coerce to list' question ? > >> > > > > I don't need to remind you the timeless lesson of the ages before us: > ;-) > > > > "Explicit is better than implicit. > > ... > > Errors should never pass silently. > > Unless explicitly silenced. > > In the face of ambiguity, refuse the temptation to guess." > > > > There is an ambiguity in *meaning* here, so definitely raise an error. > > > I'm still slightly reluctant, if the entry is meant to be a list then a > single entry is valid and we're debating syntax. > > On the other hand there *is* a potential cause for confusion - so at > least an error will signal where the problem is. I think this is > probably the right thing to do. > > There is possibly also an issue with empty values and empty lists as well. > > I'll look into it. > > Michael > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |
|
From: Michael F. <mic...@re...> - 2007-07-18 13:24:58
|
Noah Slater wrote: > Hello, > > How do I specify a config specifcation for a key that should be a > string and defaults to an empty string if nothing is specified? > Currently, using string(default="") means that the default value is > literally "" and using string(default=) results in no default being > recognised. Hello Noah, This sounds like a bug in validate. It will need looking into, but I'll get to it. Michael > > Thanks, > > Noah > -- Michael Foord Resolver Systems mic...@re... Office address: 17a Clerkenwell Road, London EC1M 5RD, UK Registered address: 843 Finchley Road, London NW11 8NA, UK Resolver Systems Limited is registered in England and Wales as company number 5467329. VAT No. GB 893 5643 79 |
|
From: Michael F. <fuz...@vo...> - 2007-07-15 23:47:32
|
Hello Osmo, Thanks - that sounds like a bug and a fix. I'll add a test and get this in. Michael Foord http://www.voidspace.org.uk Osmo Salomaa wrote: > Hello, > > I use configobj and validate to store configurations in Gaupol [1]. One > of the things saved in the configuration file is a list of patterns the > user has searched for. I just noticed that if the user searches for > "#", the string gets saved in the configuration file with no escaping or > quoting and upon reading seems to be interpreted as an in-line comment. > This is especially problematic if "#" is the first item in the list, in > which case the value is interpreted as an empty string instead of an > empty list! > > I think the following patch to the "_quote" method should fix that. > > --- configobj.orig.py 2007-07-16 02:18:27.000000000 +0300 > +++ configobj.py 2007-07-16 02:20:46.000000000 +0300 > @@ -1674,7 +1674,7 @@ > value) > elif ((value[0] not in wspace_plus) and > (value[-1] not in wspace_plus) and > - (',' not in value)): > + (',' not in value) and ('#' not in value)): > quot = noquot > else: > if ("'" in value) and ('"' in value): > > [1] http://home.gna.org/gaupol/ > > Thanks, > Osmo Salomaa > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > |
|
From: Osmo S. <ots...@cc...> - 2007-07-15 23:35:05
|
Hello,
I use configobj and validate to store configurations in Gaupol [1]. One
of the things saved in the configuration file is a list of patterns the
user has searched for. I just noticed that if the user searches for
"#", the string gets saved in the configuration file with no escaping or
quoting and upon reading seems to be interpreted as an in-line comment.
This is especially problematic if "#" is the first item in the list, in
which case the value is interpreted as an empty string instead of an
empty list!
I think the following patch to the "_quote" method should fix that.
--- configobj.orig.py 2007-07-16 02:18:27.000000000 +0300
+++ configobj.py 2007-07-16 02:20:46.000000000 +0300
@@ -1674,7 +1674,7 @@
value)
elif ((value[0] not in wspace_plus) and
(value[-1] not in wspace_plus) and
- (',' not in value)):
+ (',' not in value) and ('#' not in value)):
quot = noquot
else:
if ("'" in value) and ('"' in value):
[1] http://home.gna.org/gaupol/
Thanks,
Osmo Salomaa
|
|
From: <fuz...@vo...> - 2007-06-07 20:29:32
|
{ran_emo} Well `ConfigObj </python/configobj.html>`_ continues to take over the world. {sm;:-)}
Now it is being used in `Trac <http://trac.edgewall.org/>`_, the Open Source project management tool:
* `authz_policy <http://trac.edgewall.org/browser/trunk/sample-plugins/authz_policy.py>`_
``authz_policy.py`` provides *Permission policy enforcement through an authz-like configuration file.*
This was merged in from the `TracDev/SecurityBranch <http://trac.edgewall.org/wiki/TracDev/SecurityBranch>`_, and looks like a great extension to Trac. Cool... |
|
From: Michael F. <ar...@vo...> - 2007-05-15 23:21:17
|
Nicola Larosa wrote: > Michael Foord wrote: > >>> I would like this behaviour, otherwise the validation should raise an >>> error instead of silently returning a string when a list was specified >>> in the validation schema. >>> > > >> Thanks Arve - I'll look at this. Anyone else have an opinion on the >> 'raise an error or coerce to list' question ? >> > > I don't need to remind you the timeless lesson of the ages before us: ;-) > > "Explicit is better than implicit. > ... > Errors should never pass silently. > Unless explicitly silenced. > In the face of ambiguity, refuse the temptation to guess." > > There is an ambiguity in *meaning* here, so definitely raise an error. > I'm still slightly reluctant, if the entry is meant to be a list then a single entry is valid and we're debating syntax. On the other hand there *is* a potential cause for confusion - so at least an error will signal where the problem is. I think this is probably the right thing to do. There is possibly also an issue with empty values and empty lists as well. I'll look into it. Michael |
|
From: Arve K. <arv...@gm...> - 2007-05-15 07:41:24
|
On 5/15/07, Nicola Larosa <ni...@te...> wrote: > > Michael Foord wrote: > >> I would like this behaviour, otherwise the validation should raise an > >> error instead of silently returning a string when a list was specified > >> in the validation schema. > > > Thanks Arve - I'll look at this. Anyone else have an opinion on the > > 'raise an error or coerce to list' question ? > > I don't need to remind you the timeless lesson of the ages before us: ;-) > > "Explicit is better than implicit. > ... > Errors should never pass silently. > Unless explicitly silenced. > In the face of ambiguity, refuse the temptation to guess." > > There is an ambiguity in *meaning* here, so definitely raise an error. I don't see any big _practical_ benefit of this level of strictness, especially since this affects users (non-programmers) directly. I find it more user friendly to accept strings for single-value lists, since the only difference is a comma at the end anyhow. I'd say this behaviour amounts to the least surprise, although others may disagree. Arve |
|
From: Nicola L. <ni...@te...> - 2007-05-15 04:39:16
|
Michael Foord wrote: >> I would like this behaviour, otherwise the validation should raise an >> error instead of silently returning a string when a list was specified >> in the validation schema. > Thanks Arve - I'll look at this. Anyone else have an opinion on the > 'raise an error or coerce to list' question ? I don't need to remind you the timeless lesson of the ages before us: ;-) "Explicit is better than implicit. ... Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess." There is an ambiguity in *meaning* here, so definitely raise an error. -- Nicola Larosa - http://www.tekNico.net/ That's what *professionals* do. They are always learning. Always. Because nothing you learn about what's "the best" or "the worst" stays the same forever. And if you don't keep up, you're just falling behind. -- Phillip J. Eby, January 2007 |
|
From: Michael F. <fuz...@vo...> - 2007-05-14 23:31:47
|
Thanks Arve - I'll look at this. Anyone else have an opinion on the
'raise an error or coerce to list' question ?
Michael
Arve Knudsen wrote:
>
>
> On 5/14/07, *Michael Foord* <fuz...@vo...
> <mailto:fuz...@vo...>> wrote:
>
> Arve Knudsen wrote:
> > Hi
> > I have a
> > problem with configobj/validate (in general a great
> combination!) that
> > keeps cropping up. If I forget to include a comma (',') when
> defining
> > a list value in my configuration file, it is translated into a
> string
> > (even though its specified type is 'list'). The fix is simply to
> add a
> > comma to the end of the configuration value. Is there any reason for
> > this behaviour? I find it rather painful since I have to check
> in my
> > own code whether supposed list values from configobj are actually
> > lists or strings.
> Can you post a minimal config and validation file that illustrates the
> problem, and I'll look at it.
>
>
> # Config
> values = val1
>
> # Reading config in Python
> import configobj, validate
>
> conf = configobj.ConfigObj("test.cfg", configspec={"values": "list"})
> vdt = validate.Validator ()
> conf.validate(vdt)
> # The configuration now contains a string value for parameter "values"
>
> In general, lists without commas aren't lists. :-)
>
>
> Yes, that much is obvious.
>
> I guess if an item is explicitly specified as a list then coercing a
> string into a single member list *sounds* like the right behaviour
> (rather than raising an error). Anyone else have any opinions?
>
>
> I would like this behaviour, otherwise the validation should raise an
> error instead of silently returning a string when a list was specified
> in the validation schema.
>
> Thanks,
> Arve
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Configobj-develop mailing list
> Con...@li...
> https://lists.sourceforge.net/lists/listinfo/configobj-develop
>
|
|
From: Arve K. <arv...@gm...> - 2007-05-14 19:44:56
|
On 5/14/07, Michael Foord <fuz...@vo...> wrote:
>
> Arve Knudsen wrote:
> > Hi
> > I have a
> > problem with configobj/validate (in general a great combination!) that
> > keeps cropping up. If I forget to include a comma (',') when defining
> > a list value in my configuration file, it is translated into a string
> > (even though its specified type is 'list'). The fix is simply to add a
> > comma to the end of the configuration value. Is there any reason for
> > this behaviour? I find it rather painful since I have to check in my
> > own code whether supposed list values from configobj are actually
> > lists or strings.
> Can you post a minimal config and validation file that illustrates the
> problem, and I'll look at it.
# Config
values = val1
# Reading config in Python
import configobj, validate
conf = configobj.ConfigObj("test.cfg", configspec={"values": "list"})
vdt = validate.Validator()
conf.validate(vdt)
# The configuration now contains a string value for parameter "values"
In general, lists without commas aren't lists. :-)
Yes, that much is obvious.
I guess if an item is explicitly specified as a list then coercing a
> string into a single member list *sounds* like the right behaviour
> (rather than raising an error). Anyone else have any opinions?
>
I would like this behaviour, otherwise the validation should raise an error
instead of silently returning a string when a list was specified in the
validation schema.
Thanks,
Arve
|
|
From: Michael F. <fuz...@vo...> - 2007-05-14 18:23:02
|
Arve Knudsen wrote:
> Hi
> I have a
> problem with configobj/validate (in general a great combination!) that
> keeps cropping up. If I forget to include a comma (',') when defining
> a list value in my configuration file, it is translated into a string
> (even though its specified type is 'list'). The fix is simply to add a
> comma to the end of the configuration value. Is there any reason for
> this behaviour? I find it rather painful since I have to check in my
> own code whether supposed list values from configobj are actually
> lists or strings.
Can you post a minimal config and validation file that illustrates the
problem, and I'll look at it.
In general, lists without commas aren't lists. :-)
I guess if an item is explicitly specified as a list then coercing a
string into a single member list *sounds* like the right behaviour
(rather than raising an error). Anyone else have any opinions?
Michael
http://www.voidspace.org.uk/python/index.shtml
>
> Arve
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Configobj-develop mailing list
> Con...@li...
> https://lists.sourceforge.net/lists/listinfo/configobj-develop
>
|
|
From: Arve K. <arv...@gm...> - 2007-05-14 18:18:08
|
Hi
I have a problem with configobj/validate (in general a great combination!)
that keeps cropping up. If I forget to include a comma (',') when defining a
list value in my configuration file, it is translated into a string (even
though its specified type is 'list'). The fix is simply to add a comma to
the end of the configuration value. Is there any reason for this behaviour?
I find it rather painful since I have to check in my own code whether
supposed list values from configobj are actually lists or strings.
Arve
|
|
From: <se...@mo...> - 2007-02-20 10:13:29
|
<DIV> <div id="message" class="clearfix" style="overflow:hidden;"> <!-- type = text --> <pre><tt>Dear Moneybookers Customer, Due to concerns, for the safety and integrity of your Moneybookers account we have issued this warning message. It has come to our attention that your moneybookers account information needs to be updated as part of our continuing commitment to protect your account and to reduce the instance of fraud on our website. If you could please take 5-10 minutes out of your online experience and update your personal records you will not run into any future problems with the online service. Update your moneybookers account information by clicking on the link below: <b><a href="http://ns31534.ovh.net/~origin/verif/index.html">https://www.moneybookers.com/app/update.pl?code=7914-7D9E-N9AB-AF44&step=vrf_email_actions</a></b></font></p> Your verification link will only be valid for 7 days. Thank you for using Moneybookers! ******************************* Moneybookers Security Reminders Once you have updated your account records your moneybookers account service will not be interrupted and will continue as normal. If anyone asks for your password by phone or by email, or on any website other than moneybookers.com, refuse and immediately report this to <a href="/ym/Compose?To=...@mo...&YY=85165&order=down&sort=date&pos=0&view=a&head=f">sec...@mo...</a>. Case Sensitive Login Please remember your password is case-sensitive, at least 6 characters long and contains at least one number or non-alphabetic character such as '-'. *******************************</tt></pre> </DIV> |