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: EntityReborn <ent...@gm...> - 2010-02-27 17:28:13
|
Interesting, as I have the 4.7.1 version (or so the gzip says.). I'll switch down and see how that runs. |
|
From: David H. <neg...@gm...> - 2010-02-27 17:23:25
|
I just ran your script and got '5' everywhere you claim you got '2'. Using configobj v4.6.0. Otherwise I was expecting to be able to explain that you were probably getting back a copy of a dict, rather than the dict itself, and so setting the value had no effect on the internal state of the ConfigObj instance. But as is, I'm not able to reproduce the behavior you described. -David On Fri, Feb 26, 2010 at 21:28, EntityReborn <ent...@gm...> wrote: > Ok, lil background. I'm a noob. Just been messing with Python since the > beginning of the year. > Onto the meat. > Trying to manipulate a value, and with a regular nested dict/list, it > works fine. With a ConfigObj, the value remains unchanged. > Have a look here for the testcase: http://paste.pocoo.org/show/183309/ > As no error is raised, I would think that this is an oversite, > especially as directly setting it, hardcoded, fails as well. > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |
|
From: EntityReborn <ent...@gm...> - 2010-02-27 17:15:30
|
Ok, lil background. I'm a noob. Just been messing with Python since the beginning of the year. Onto the meat. Trying to manipulate a value, and with a regular nested dict/list, it works fine. With a ConfigObj, the value remains unchanged. Have a look here for the testcase: http://paste.pocoo.org/show/183309/ As no error is raised, I would think that this is an oversite, especially as directly setting it, hardcoded, fails as well. |
|
From: EntityReborn <ent...@gm...> - 2010-02-27 02:29:02
|
Ok, lil background. I'm a noob. Just been messing with Python since the beginning of the year. Onto the meat. Trying to manipulate a value, and with a regular nested dict/list, it works fine. With a ConfigObj, the value remains unchanged. Have a look here for the testcase: http://paste.pocoo.org/show/183309/ As no error is raised, I would think that this is an oversite, especially as directly setting it, hardcoded, fails as well. |
|
From: Michael F. <fuz...@vo...> - 2010-02-26 13:13:22
|
On 26/02/2010 10:16, R Ramakrishnan wrote: > Hi > > When I tried to use configobj version 4.7.1 in Python 3.1.1 I faced > following problems: > Hi Ramki, I'm afraid that ConfigObj isn't yet compatible with Python 3. Some of the Unicode handling will need to be changed for Python 3, so it is not a straightforward job. Hopefully I will get round to it soon. All the best, Michael Foord > 1. setup.py install gave syntax error in few places where except > statement was handling multiple errors > > except Exception,e : which I changed to except (Exception,e): to > remove error even then the install did not install but gave me > following messages > > running build > running build_py > file configobj.py (for module configobj) not found > file validate.py (for module validate) not found > file configobj.py (for module configobj) not found > file validate.py (for module validate) not found > running install_lib > warning: install_lib: 'build\lib' does not exist -- no Python modules > to install > > running install_egg_info > Removing C:\Python31\Lib\site-packages\configobj-4.7.1-py3.1.egg-info > Writing C:\Python31\Lib\site-packages\configobj-4.7.1-py3.1.egg-info > > Is there any way out please. > > Ramki > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. |
|
From: R R. <rra...@gm...> - 2010-02-26 10:16:54
|
Hi When I tried to use configobj version 4.7.1 in Python 3.1.1 I faced following problems: 1. setup.py install gave syntax error in few places where except statement was handling multiple errors except Exception,e : which I changed to except (Exception,e): to remove error even then the install did not install but gave me following messages running build running build_py file configobj.py (for module configobj) not found file validate.py (for module validate) not found file configobj.py (for module configobj) not found file validate.py (for module validate) not found running install_lib warning: install_lib: 'build\lib' does not exist -- no Python modules to install running install_egg_info Removing C:\Python31\Lib\site-packages\configobj-4.7.1-py3.1.egg-info Writing C:\Python31\Lib\site-packages\configobj-4.7.1-py3.1.egg-info Is there any way out please. Ramki |
|
From: Michael F. <fuz...@vo...> - 2010-02-10 17:39:10
|
On 10/02/2010 17:36, Jason Baker wrote: > On Wed, Feb 10, 2010 at 10:28 AM, Michael Foord > <fuz...@vo... <mailto:fuz...@vo...>> wrote: > > What version of ConfigObj are you using? I'm pretty sure that > interpolation in list values was only just added in the 4.7 release. > > Michael > > > I'm using ConfigObj>=4.7.0. Ok, so I didn't fully understand the issue you had. Are you saying that interpolation from inside a list is not working for you? Can you provide a minimal repro? It could well just be a bug... Thanks Michael Foord > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. |
|
From: Jason B. <jb...@ze...> - 2010-02-10 17:37:07
|
On Wed, Feb 10, 2010 at 10:28 AM, Michael Foord <fuz...@vo...>wrote: > What version of ConfigObj are you using? I'm pretty sure that > interpolation in list values was only just added in the 4.7 release. > > Michael > I'm using ConfigObj>=4.7.0. |
|
From: Michael F. <fuz...@vo...> - 2010-02-10 16:28:36
|
On 10/02/2010 16:15, Jason Baker wrote: > Here's a simplified version of a config file I'm using for envbuilder: > > [[sbcl]] > setup = 'cp $CWD/customize-target-features.lisp $dir', 'sh > make.sh', 'sh install.sh' > > $CWD is an option that I implicitly define at the toplevel to be the > directory from which envb is run, and $dir has a default. Each item > in this list is a terminal command that's supposed to be part of a > build process. > > I'm getting some weird behavior that I suspect has to do with me using > validation and interpolation. As it stands right now, setup isn't > defined in the configspec. And so when I do the above, none of the > values get interpolated. IE, the first command that gets issued is > literally "cp $CWD/customize-target-features.lisp $dir". However, if > I changed it to be a single string, it works fine. I can make this > work properly if I add a setup option in the configspec and set it to > force_list. Thus, this is working for me. I just want to get a > better understanding of what's going on here. Can anyone shed some > light on it? What version of ConfigObj are you using? I'm pretty sure that interpolation in list values was only just added in the 4.7 release. Michael > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. |
|
From: Jason B. <jb...@ze...> - 2010-02-10 16:21:58
|
Here's a simplified version of a config file I'm using for envbuilder:
[[sbcl]]
setup = 'cp $CWD/customize-target-features.lisp $dir', 'sh make.sh', 'sh
install.sh'
$CWD is an option that I implicitly define at the toplevel to be the
directory from which envb is run, and $dir has a default. Each item in this
list is a terminal command that's supposed to be part of a build process.
I'm getting some weird behavior that I suspect has to do with me using
validation and interpolation. As it stands right now, setup isn't defined
in the configspec. And so when I do the above, none of the values get
interpolated. IE, the first command that gets issued is literally "cp
$CWD/customize-target-features.lisp $dir". However, if I changed it to be a
single string, it works fine. I can make this work properly if I add a
setup option in the configspec and set it to force_list. Thus, this is
working for me. I just want to get a better understanding of what's going
on here. Can anyone shed some light on it?
|
|
From: Michael F. <fuz...@vo...> - 2010-02-09 12:10:11
|
On 09/02/2010 09:52, Philippe Lachaud wrote: > Hi, > I've just downloaded the version 4.7.1 of ConfigObj and I geta > Syntax error when importing it (Python 2.3 and 2.5). > It happens in: 4.7.1 works for me in Python 2.4 and 2.5. That syntax is perfectly valid in Python 2.4, but it may indeed be invalid in 2.3. I need to install Python 2.3 to check. :-( Python 2.4.4 (#1, Oct 18 2006, 10:34:39) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import configobj >>> configobj.__version__ '4.7.1' >>> a = [1, 2, 3] >>> b = [] >>> b.extend(int(x) for x in a) >>> b [1, 2, 3] If it is a problem with 2.3 (likely to be the case) then I'll fix it and do a 4.7.2 release. My apologies. All the best, Michael Foord > def get_extra_values(...): > .... > out.extend((_prepend, name) for name in conf.extra_values) > .... > I guess it should be something like: > out.extend(*[*(_prepend, name) for name in conf.extra_values*]*) > Or am I wrong? > Cheers, > Philippe > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. |
|
From: Michael F. <fuz...@vo...> - 2010-02-09 10:40:47
|
On 09/02/2010 09:52, Philippe Lachaud wrote: > Hi, > I've just downloaded the version 4.7.1 of ConfigObj and I geta > Syntax error when importing it (Python 2.3 and 2.5). > It happens in: > def get_extra_values(...): > .... > out.extend((_prepend, name) for name in conf.extra_values) > .... > I guess it should be something like: > out.extend(*[*(_prepend, name) for name in conf.extra_values*]*) > Or am I wrong? Dammit. I'll look into this but I'm sure you're right. I'll probably have to roll a 4.7.2 release. Thanks for letting me know. All the best, Michael > Cheers, > Philippe > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. |
|
From: Philippe L. <phl...@ya...> - 2010-02-09 09:52:35
|
Hi,
I've just downloaded the version 4.7.1 of ConfigObj and I geta Syntax error when importing it (Python 2.3 and 2.5).
It happens in:
def get_extra_values(...):
....
out.extend((_prepend, name) for name in conf.extra_values)
....
I guess it should be something like:
out.extend([(_prepend, name) for name in conf.extra_values])
Or am I wrong?
Cheers,
Philippe
|
|
From: Michael F. <fuz...@vo...> - 2010-02-01 14:20:30
|
On 01/02/2010 13:29, Chris Jones wrote: > Hey > > I'm using the excellent validation features to convert config files into > the correct types, and it's working very well so far. I hacked something > up that generates the configspec on the fly based on my own internal > tree of default values, which has been a nice timesaver. > > However, I'm now trying to extend my application and I'm struggling to > conceptualise how I'm going to validate the config (and more > importantly, convert the types automatically). > > The problem is that the config section for the new feature is recursive. > It's intended to describe a particular layout of widgets in my > application, so the same layout can be recreated when starting the > application. > (the application is a tiled terminal emulator, > http://www.tenshu.net/terminator) > > The config structure would be something like: > > [layouts] > [mydebugginglayout] > [window0] > type = Window > [child1] > type = Terminal > [child2] > type = VPaned > [child3] > type = HPaned > [child4] > type = Terminal > [child5] > type = Terminal > [child6] > type = Terminal > > One possibility would be to have each element as a top level item (with generated name) that can be validated with a standard configspec. Each item could have a list of children (ordered) - specified by name. Perhaps something like this: [layouts] [[mydebugginglayout]] [[[window0]]] type = Window children = child0, child1, child2 [[[child0]] ... This would be easier to validate but means your config file doesn't reflect the layout structure directly. Validation doesn't currently support recursive repeated sections, so I can't think of an obvious way of doing what you want - other than doing the recursion manually validating a section at a time... That probably wouldn't be too hard if you prefer that. Michael > I'm not super happy about the windowN/childN section names, but storing > those as lists doesn't seem to fit the configobj style, so I'm expecting > to autogenerate them. > Given that this can essentially nest infinitely, how would I write a > configspec for it? > Would it make more sense to store the children of each level as a list > and treat it as a string, then recursively validate each child object? > > I'm not sure that any of what I've just written makes sense, let me know > if I can clarify anything. > > Thanks very much for a great config file system :) > > Cheers, > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. |
|
From: David H. <neg...@gm...> - 2010-02-01 14:17:58
|
Well.. it might make more sense to just flatten the hierarchy within the
config, and use a property to achieve the association. A config or
validation spec doesn't have to _look_ like your data model, it just has to
represent the model.
[layouts]
[[mydebugginglayout]]
[[window0]]
type = Window
parent =
[[child1]]
type = Terminal
parent = window0
[[child2]]
type = VPaned
parent = window0
[[child3]]
type = HPaned
parent = child2
[[child4]]
type = Terminal
parent = child3
[[child5]]
type = Terminal
parent = child3
[[child6]]
type = Terminal
parent = child2
That lends itself very nicely to a __many__ block in the validation spec.
And all the information necessary to completely recover the full nested
hierarchy is there. The only thing you'd have to protect against is the
presence in the config data of a bogus node name (i.e. referencing a missing
parent), since the organization of the data itself wouldn't guarantee
validity.
cheers,
-David
On Mon, Feb 1, 2010 at 08:29, Chris Jones <cm...@te...> wrote:
> Hey
>
> I'm using the excellent validation features to convert config files into
> the correct types, and it's working very well so far. I hacked something
> up that generates the configspec on the fly based on my own internal
> tree of default values, which has been a nice timesaver.
>
> However, I'm now trying to extend my application and I'm struggling to
> conceptualise how I'm going to validate the config (and more
> importantly, convert the types automatically).
>
> The problem is that the config section for the new feature is recursive.
> It's intended to describe a particular layout of widgets in my
> application, so the same layout can be recreated when starting the
> application.
> (the application is a tiled terminal emulator,
> http://www.tenshu.net/terminator)
>
> The config structure would be something like:
>
> [layouts]
> [mydebugginglayout]
> [window0]
> type = Window
> [child1]
> type = Terminal
> [child2]
> type = VPaned
> [child3]
> type = HPaned
> [child4]
> type = Terminal
> [child5]
> type = Terminal
> [child6]
> type = Terminal
>
> I'm not super happy about the windowN/childN section names, but storing
> those as lists doesn't seem to fit the configobj style, so I'm expecting
> to autogenerate them.
> Given that this can essentially nest infinitely, how would I write a
> configspec for it?
> Would it make more sense to store the children of each level as a list
> and treat it as a string, then recursively validate each child object?
>
> I'm not sure that any of what I've just written makes sense, let me know
> if I can clarify anything.
>
> Thanks very much for a great config file system :)
>
> Cheers,
> --
> Chris Jones
> cm...@te...
> www.tenshu.net
>
>
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Configobj-develop mailing list
> Con...@li...
> https://lists.sourceforge.net/lists/listinfo/configobj-develop
>
|
|
From: Chris J. <cm...@te...> - 2010-02-01 14:00:12
|
Hey I'm using the excellent validation features to convert config files into the correct types, and it's working very well so far. I hacked something up that generates the configspec on the fly based on my own internal tree of default values, which has been a nice timesaver. However, I'm now trying to extend my application and I'm struggling to conceptualise how I'm going to validate the config (and more importantly, convert the types automatically). The problem is that the config section for the new feature is recursive. It's intended to describe a particular layout of widgets in my application, so the same layout can be recreated when starting the application. (the application is a tiled terminal emulator, http://www.tenshu.net/terminator) The config structure would be something like: [layouts] [mydebugginglayout] [window0] type = Window [child1] type = Terminal [child2] type = VPaned [child3] type = HPaned [child4] type = Terminal [child5] type = Terminal [child6] type = Terminal I'm not super happy about the windowN/childN section names, but storing those as lists doesn't seem to fit the configobj style, so I'm expecting to autogenerate them. Given that this can essentially nest infinitely, how would I write a configspec for it? Would it make more sense to store the children of each level as a list and treat it as a string, then recursively validate each child object? I'm not sure that any of what I've just written makes sense, let me know if I can clarify anything. Thanks very much for a great config file system :) Cheers, -- Chris Jones cm...@te... www.tenshu.net |
|
From: Jason B. <jb...@ze...> - 2010-01-28 20:59:19
|
On Thu, Jan 28, 2010 at 1:15 PM, Ramon Felciano <fel...@ya...> wrote: > Hello all, > > I have migrated my ad hoc configuration settings to ConfigObj and am > quite happy with how it is working out. My project includes a number > of commandline programs that all need to re-use the same configuration > settings, so I've abstracted access to the configuration data through > a config.py file that finds the INI file, loads it into a module-level > variable, and provides some utility functions to access the config > data. So far so good. > > However, I am struggling to define a cross-platform deployment set up > for configuration files that isn't brittle bootstrapping during code > startup, and was wondering how others have solved this issue. The two > issues I have are placement of the INI file itself, and the most > pythonic method for subsequently locating and loading that file. > > 1. Location of the INI files go when you deploy your project. I > imagine you want them separate from the code so you easily deploy code > updates while maintaining settings files intact. Are there guidelines > for storing this in a standardized location? E.g. next to your code? > in a project-dependent data directory? in a user-specific data > directory? > > 2. Finding the INI file from within the installed, running code. I > would like to avoid forcing users to have pass the INI file location > on the commandline. My config.py file currently searches for it in the > sys.path list, but most of these are geared toward finding code, not > settings files. For that same reason, I'm hesitant to hack sys.path to > add in data directories as well. Is there a standard location > (platform-independent or abstracted via a python lib) to find these, > similar to how the tempfile module works? > If you decide that you want to distribute it actually within your Python package, I would set it up as package data using setuptools: http://peak.telecommunity.com/DevCenter/setuptools#including-data-files The API for accessing the data is slightly annoying, but it works: http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources Aside from that, I would say that the "correct" approach depends more on your program's requirements than the fact that you're using Pyhon. There are reasons to use all three ways: E.g. next to your code? > If you want to be able to configure the project on a per-installation basis, then this is the approach you would want to take. Note that there's not really any difference in this approach and the next one unless you're using virtualenv or having multiple Python installations though. in a project-dependent data directory? This is the approach to take if you want to configure settings system-wide across multiple Python installations. Personally, I feel that this would be somewhat more difficult to deploy than the previous option unless you have a valid reason to configure things across multiple Python installations and/or virtualenvs. in a user-specific data directory > This is pretty much your only choice if you want to be able to have configuration settings on a per-user basis. You probably want to begin this file name with a dot on *nix systems as that makes it invisible (which is usually preferable). |
|
From: Ramon F. <fel...@ya...> - 2010-01-28 19:15:30
|
Hello all, I have migrated my ad hoc configuration settings to ConfigObj and am quite happy with how it is working out. My project includes a number of commandline programs that all need to re-use the same configuration settings, so I've abstracted access to the configuration data through a config.py file that finds the INI file, loads it into a module-level variable, and provides some utility functions to access the config data. So far so good. However, I am struggling to define a cross-platform deployment set up for configuration files that isn't brittle bootstrapping during code startup, and was wondering how others have solved this issue. The two issues I have are placement of the INI file itself, and the most pythonic method for subsequently locating and loading that file. 1. Location of the INI files go when you deploy your project. I imagine you want them separate from the code so you easily deploy code updates while maintaining settings files intact. Are there guidelines for storing this in a standardized location? E.g. next to your code? in a project-dependent data directory? in a user-specific data directory? 2. Finding the INI file from within the installed, running code. I would like to avoid forcing users to have pass the INI file location on the commandline. My config.py file currently searches for it in the sys.path list, but most of these are geared toward finding code, not settings files. For that same reason, I'm hesitant to hack sys.path to add in data directories as well. Is there a standard location (platform-independent or abstracted via a python lib) to find these, similar to how the tempfile module works? Thanks in advance for any pointers or suggestions, Ramon |
|
From: Andrew G. <mu...@gm...> - 2010-01-25 23:30:51
|
FWIW, I've done this in a couple isolated cases with the following naughty hack: cfg = ConfigObj(...) ... cfg.comments[section_name].insert(0, '') ~Andrew On Mon, Jan 25, 2010 at 5:05 PM, Brad McRae <bm...@tn...> wrote: > Hello, > > I'm switching over from ConfigParser, and so far have found configobj to be > very straightforward. > > The one thing I'd like to do is have a blank line between sections. This > was done automatically in ConfigParser, and makes it easier to manually edit > the config files. > > Is there a way to insert blank lines? > > Thanks, > Brad > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > |
|
From: Michael F. <fuz...@vo...> - 2010-01-25 23:21:01
|
On 25/01/2010 23:05, Brad McRae wrote: > Hello, > > I'm switching over from ConfigParser, and so far have found configobj > to be very straightforward. > > The one thing I'd like to do is have a blank line between sections. > This was done automatically in ConfigParser, and makes it easier to > manually edit the config files. > > Is there a way to insert blank lines? Hmm... not currently, but I'd happily accept a patch (with test of course). That sounds like a nice feature for readability. Michael > > Thanks, > Brad > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. |
|
From: Brad M. <bm...@TN...> - 2010-01-25 23:19:14
|
Hello, I'm switching over from ConfigParser, and so far have found configobj to be very straightforward. The one thing I'd like to do is have a blank line between sections. This was done automatically in ConfigParser, and makes it easier to manually edit the config files. Is there a way to insert blank lines? Thanks, Brad |
|
From: Jason B. <amn...@gm...> - 2010-01-25 16:18:13
|
On Sun, Jan 24, 2010 at 1:32 PM, Michael Foord <fuz...@vo...> wrote: > On 24/01/2010 13:11, Jason Baker wrote: >> I'm using configobj for envbuilder[1]. There's one place where I'm a >> bit stuck and I'm curious if there's any way around it. Essentially, >> I have a section that defines a set of packages (parcels) to be >> checked out from SCM, and another section that defines commands to be >> run against all parcels. Here's the example from the readme: >> > > Heh. I don't have any brilliant ideas - a phase of post-processing > sounds like the best way to me. The solution that I ended up implementing is actually pretty simple. I decided that parcel options should be delimited by a % instead of a $, and I just run my own Template sub-class over the strings (so now I can get rid of the ugly $$PARCEL_WD hack). Thanks for the help, guys! |
|
From: David H. <neg...@gm...> - 2010-01-24 20:17:17
|
Hey Jason,
I certainly don't think new code in configobj is the way to accomplish what
you describe.
The 'status' subsection in the 'commands' section is (as I read it) a
recipe that gets applied programmatically at runtime against a set of
multiple blocks of recipe input. I.e. - you apply the 'status' operation to
every parcel described in the 'project' section (explicitly listed by the
'parcels' entry).
But from a configuration standpoint, 'status' is ONE block, and the parcels
are MANY blocks. You cannot have a command be both generic and
simultaneously reflective of explicit values in every entry in the list of
parcel data. More specifically: working_dir cannot be set to more than one
cwd value at any given time anyway, so I'm confused what kind of meaningful
thing you think ConfigObj could do in this scenario anyway.
But more to the point: why does it need to? You have everything you need
already. Rather than having:
working_dir = '$$PARCEL_WD', why not have:
working_dir = 'cwd'
Thus working_dir becomes a mapping, telling you what keyword in any given
parcel contains the information you need for the command's keyword. I.e.
it's just a one-level indirection mechanism.
Once your program has digested the config data at runtime, you presumably
iterate over all of the commands, on all of the parcels. So it might look
something like:
for cmd in cfg['commands'].keys():
for parcel in cfg['project']['parcels']:
cwd = cfg['project'][parcel][cfg['commands'][cmd]['working_dir']]
<...do stuff...>
And note that even this is only necessary if the command config requires a
'working_dir' keyword instead of just 'cwd'. Because otherwise, you don't
even need the mapping. A command's config section provides the information
necessary to uniquely define it, and you fill in any missing values that
originate from a parcel config block by using the keyword:value pairs
directly from the parcel's config data!
ConfigObj (and configuration parsing in general) provides error-checking,
sanitation, and defaulting. It doesn't (and shouldn't) provide program
logic.
regards,
-David
On Sun, Jan 24, 2010 at 08:11, Jason Baker <amn...@gm...> wrote:
> I'm using configobj for envbuilder[1]. There's one place where I'm a
> bit stuck and I'm curious if there's any way around it. Essentially,
> I have a section that defines a set of packages (parcels) to be
> checked out from SCM, and another section that defines commands to be
> run against all parcels. Here's the example from the readme:
>
> [project]
> parcels = 'envbuilder', # Note the comma
>
> [[DEFAULT]]
> git_checkout = 'git clone $url'
> cwd = '/home/jason/src/envbuilder-src'
> python = '$cwd/bin/python'
>
> [[envbuilder]]
> dir = 'envbuilder'
> url = 'git://github.com/jasonbaker/envbuilder.git'
> setup = '$python setup.py develop'
> checkout = '$git_checkout'
>
> [commands]
> [[ status ]]
> required = True
> default = 'git status'
> working_dir = '$$PARCEL_WD'
> help = 'Check the status of all checked-out parcels'
>
> The working_dir's value of $$PARCEL_WD is a bit of a hack. I just go
> in and substitute the parcel's working directory for $PARCEL_WD
> *after* interpolation has already run. What would be nice is if I
> could access the parcel's option dir. Bear in mind that since parcels
> are defined as a __many__ subsection, I need to get the value for
> *each* parcel.
>
> I understand that this will likely require me to write some code
> somewhere (either in configobj or in envbuilder), but can someone help
> me figure out the best way to go about solving this problem?
>
> [1] http://github.com/jasonbaker/envbuilder
>
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for
> Conference
> attendees to learn about information security's most important issues
> through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> Configobj-develop mailing list
> Con...@li...
> https://lists.sourceforge.net/lists/listinfo/configobj-develop
>
|
|
From: Michael F. <fuz...@vo...> - 2010-01-24 19:32:43
|
On 24/01/2010 13:11, Jason Baker wrote: > I'm using configobj for envbuilder[1]. There's one place where I'm a > bit stuck and I'm curious if there's any way around it. Essentially, > I have a section that defines a set of packages (parcels) to be > checked out from SCM, and another section that defines commands to be > run against all parcels. Here's the example from the readme: > Heh. I don't have any brilliant ideas - a phase of post-processing sounds like the best way to me. All the best, Michael > [project] > parcels = 'envbuilder', # Note the comma > > [[DEFAULT]] > git_checkout = 'git clone $url' > cwd = '/home/jason/src/envbuilder-src' > python = '$cwd/bin/python' > > [[envbuilder]] > dir = 'envbuilder' > url = 'git://github.com/jasonbaker/envbuilder.git' > setup = '$python setup.py develop' > checkout = '$git_checkout' > > [commands] > [[ status ]] > required = True > default = 'git status' > working_dir = '$$PARCEL_WD' > help = 'Check the status of all checked-out parcels' > > The working_dir's value of $$PARCEL_WD is a bit of a hack. I just go > in and substitute the parcel's working directory for $PARCEL_WD > *after* interpolation has already run. What would be nice is if I > could access the parcel's option dir. Bear in mind that since parcels > are defined as a __many__ subsection, I need to get the value for > *each* parcel. > > I understand that this will likely require me to write some code > somewhere (either in configobj or in envbuilder), but can someone help > me figure out the best way to go about solving this problem? > > [1] http://github.com/jasonbaker/envbuilder > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. |
|
From: Jason B. <amn...@gm...> - 2010-01-24 13:12:04
|
I'm using configobj for envbuilder[1]. There's one place where I'm a
bit stuck and I'm curious if there's any way around it. Essentially,
I have a section that defines a set of packages (parcels) to be
checked out from SCM, and another section that defines commands to be
run against all parcels. Here's the example from the readme:
[project]
parcels = 'envbuilder', # Note the comma
[[DEFAULT]]
git_checkout = 'git clone $url'
cwd = '/home/jason/src/envbuilder-src'
python = '$cwd/bin/python'
[[envbuilder]]
dir = 'envbuilder'
url = 'git://github.com/jasonbaker/envbuilder.git'
setup = '$python setup.py develop'
checkout = '$git_checkout'
[commands]
[[ status ]]
required = True
default = 'git status'
working_dir = '$$PARCEL_WD'
help = 'Check the status of all checked-out parcels'
The working_dir's value of $$PARCEL_WD is a bit of a hack. I just go
in and substitute the parcel's working directory for $PARCEL_WD
*after* interpolation has already run. What would be nice is if I
could access the parcel's option dir. Bear in mind that since parcels
are defined as a __many__ subsection, I need to get the value for
*each* parcel.
I understand that this will likely require me to write some code
somewhere (either in configobj or in envbuilder), but can someone help
me figure out the best way to go about solving this problem?
[1] http://github.com/jasonbaker/envbuilder
|