Greetings,
For some modules, I have .yaml file which contains configuration option next to
the module itself. For example, there will be mypackage/logger.yaml next to
mypackag/logger.py.
What the best way to tell distutils/setuptools to package all these files?
(I can write my custom function
language that’s Turing-
complete?
I think not. Configuration files should be read as data; they should be
declarative only, not executable languages. That way, a different
program can read and parse them without having to be a parser for an
entire programming language.
For local non distribu
uage that’s Turing-
> complete?
I think not. Configuration files should be read as data; they should be
declarative only, not executable languages. That way, a different
program can read and parse them without having to be a parser for an
entire programming language.
As illustration of this po
In message <7j8w5tylmw@rapun.sel.cam.ac.uk>, Matthew Vernon wrote:
> Is there a more idiomatic way of loading in a configuration file
> that's python code ...
Is it really a good idea to have a configuration language that’s Turing-
complete?
--
http://mail.python.org/mailman/listinfo/python-
On 7/3/2010 5:15 AM, Matthew Vernon wrote:
Hi,
Is there a more idiomatic way of loading in a configuration file
that's python code than:
_temp=__import__(path,fromlist='cachestrs')
cachestrs=_temp.cachestrs
? I mean, that's pretty ugly...Plain "import" doesn't work in this
case because 'path'
Peter Otten <__pete...@web.de> writes:
> Matthew Vernon wrote:
>
> > Is there a more idiomatic way of loading in a configuration file
> > that's python code than:
> >
> > _temp=__import__(path,fromlist='cachestrs')
> > cachestrs=_temp.cachestrs
> >
> > ? I mean, that's pretty ugly...Plain "impo
Matthew Vernon a écrit :
> Hi,
>
> Is there a more idiomatic way of loading in a configuration file
> that's python code than:
>
> _temp=__import__(path,fromlist='cachestrs')
> cachestrs=_temp.cachestrs
>
> ? I mean, that's pretty ugly...Plain "import" doesn't work in this
> case because 'path'
Matthew Vernon wrote:
> Is there a more idiomatic way of loading in a configuration file
> that's python code than:
>
> _temp=__import__(path,fromlist='cachestrs')
> cachestrs=_temp.cachestrs
>
> ? I mean, that's pretty ugly...Plain "import" doesn't work in this
> case because 'path' is a variab
Hi,
Is there a more idiomatic way of loading in a configuration file
that's python code than:
_temp=__import__(path,fromlist='cachestrs')
cachestrs=_temp.cachestrs
? I mean, that's pretty ugly...Plain "import" doesn't work in this
case because 'path' is a variable defined elsewhere
TIA,
Matthe
En Wed, 04 Mar 2009 13:50:32 -0200, W. eWatson
escribió:
Gabriel Genellina wrote:
En Wed, 04 Mar 2009 12:12:50 -0200, W. eWatson
escribió:
That's fine, but I think my problem boils down to one question. There
seem to be two ways to communicate with a dialog (I mean a collection
of widg
Gabriel Genellina wrote:
En Wed, 04 Mar 2009 12:12:50 -0200, W. eWatson
escribió:
That's fine, but I think my problem boils down to one question. There
seem to be two ways to communicate with a dialog (I mean a collection
of widgets assembled in a window that requires the user enter various
On Wed, 04 Mar 2009 06:12:50 -0800, W. eWatson wrote:
> That's fine, but I think my problem boils down to one question. There
> seem to be two ways to communicate with a dialog (I mean a collection of
> widgets assembled in a window that requires the user enter various
> parameters, integers, stri
En Wed, 04 Mar 2009 12:12:50 -0200, W. eWatson
escribió:
That's fine, but I think my problem boils down to one question. There
seem to be two ways to communicate with a dialog (I mean a collection of
widgets assembled in a window that requires the user enter various
parameters, integers,
Gabriel Genellina wrote:
En Wed, 04 Mar 2009 03:13:43 -0200, W. eWatson
escribió:
I'm converting a Tkinter program (Win XP) that uses widgets that
allows the user to change default values of various parameters like
start and stop time in hh:mm:ss, time of exposure in seconds, and
whether ce
En Wed, 04 Mar 2009 03:13:43 -0200, W. eWatson
escribió:
I'm converting a Tkinter program (Win XP) that uses widgets that allows
the user to change default values of various parameters like start and
stop time in hh:mm:ss, time of exposure in seconds, and whether certain
options should b
I'm converting a Tkinter program (Win XP) that uses widgets that allows the
user to change default values of various parameters like start and stop time
in hh:mm:ss, time of exposure in seconds, and whether certain options should
be on or off. The initial values are set in the code. I can pretty
Does ConfigParser allow writing configuration changes also?
"Dennis Lee Bieber" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> On Sat, 14 Jun 2008 21:27:19 +0200, "Robert" <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > What is the most Pythonic way to ma
On 04:11, domenica 15 giugno 2008 Daniel Fetchinson wrote:
> Check this out: http://www.voidspace.org.uk/python/configobj.html
>
Let me add:
cfgparse, iniparse
I've look at all to find a simple solution for my interest, but I realized
not a good result.
I'm using three of them ConfigParser, cfgpa
> What is the most Pythonic way to maintain a configuration file?
> Are there any libraries mimicking registry / ini file writing that many
> windows programming languages/environments offer?
Check this out: http://www.voidspace.org.uk/python/configobj.html
Cheers,
Daniel
--
Psss, psss, put it d
What is the most Pythonic way to maintain a configuration file?
Are there any libraries mimicking registry / ini file writing that many
windows programming languages/environments offer?
Robert
--
http://mail.python.org/mailman/listinfo/python-list
> I would like it to be editable, through a web browser or a GUI
> application. With ConfigParser I can read the configuration file and
> edit the options, but when I write the result all the comments are
lost
Hey Pierre,
I came across a good review of a number of possible solutions for this
at h
Pierre Quentel wrote:
Bonjour,
I am developing an application and I have a configuration file with a
lot of comments to help the application users understand what the
options mean
I would like it to be editable, through a web browser or a GUI
application. With ConfigParser I can read the config
Bonjour,
I am developing an application and I have a configuration file with a
lot of comments to help the application users understand what the
options mean
I would like it to be editable, through a web browser or a GUI
application. With ConfigParser I can read the configuration file and
edit
>thanks for the replies, guys!
Your welcome, glad I could help.
>(Spending time on these newsgroups is giving me more questions that
>answers heh )
Thats good as long as it motivates you to learn ;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
thanks for the replies, guys!
MEFarmer, that example helps remove a lot of the confusion, thanks!
I've looked through the SDL but there are so many different ways to do
it, I wasn't which one was hands down best
And Mike, I wish they would stick explanations like that in the SDL!
Would help make
Here are two functions that show how to use ConfigParser.
py>def ConfigWrite(key, value, section, cfgpath):
... import ConfigParser, pprint
... parser=ConfigParser.ConfigParser()
... cfg = open(cfgpath,'w')
... parser.add_section(section)
... Pretty = pprint.PrettyPrinter(
Aaron <[EMAIL PROTECTED]> writes:
> Hi,
>
> I'm interested in creating a large number of configuration files which I
> have no experience doing in python. The fields will be static for the most
> part. But design changes and I might want to add new fields in the f
Aaron wrote:
> Hi,
>
> I'm interested in creating a large number of configuration files
which I
> have no experience doing in python. The fields will be static for the
most
> part. But design changes and I might want to add new fields in the
future..
>
> My question is -
Hi,
I'm interested in creating a large number of configuration files which I
have no experience doing in python. The fields will be static for the most
part. But design changes and I might want to add new fields in the future..
My question is - whats the best module for creating, reading
29 matches
Mail list logo