Ian Pilcher writes:
> How do a set a default for option-1 *only* in section-1?
I think you misinderstand the semantics of what ‘configparser’ expects
https://docs.python.org/3/library/configparser.html#configparser-objects>:
Default values […] are used in interpolation if an option used is
"Deborah Swanson" writes:
> I could probably write this myself, but I'm wondering if this hasn't
> already been done many times.
Can you describe what you are looking for, in enough detail that we can
know whether it's already been done as you want it?
--
\ “God forbid that any book shou
I am trying to use ConfigParser for the first time (while also writing
my first quasi-serious Python program). Assume that I want to parse a
a configuration file of the following form:
[section-1]
option-1 = value1
option-2 = value2
[section-2]
option-1 = value3
option-2 = value4
H
On Saturday, February 18, 2017 at 6:03:37 PM UTC, Wildman wrote:
> On Sat, 18 Feb 2017 09:38:32 -0800, TTaglo wrote:
>
> > i = 1
> > f = open ('rosalind_ini5(1).txt')
> > for line in f.readlines():
> > if i % 2 == 0:
> > print line
> > i += 1
> >
> >
> > How do i get output witho
I could probably write this myself, but I'm wondering if this hasn't
already been done many times. Anyone have some git links or other
places to download from?
--
https://mail.python.org/mailman/listinfo/python-list
There are some nice changes in here. You can mention to the students
that I really appreciated the work done on the menu loop. You took an
example of code that had grown piecemeal and become reasonably
unmaintainable, and refactored it to be very maintainable in the
future.
Good luck to all class