Re: [Tutor] using configobj package to output quoted strings

2011-06-19 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Alex Hall wrote: On 6/18/11, Steven D'Aprano wrote: Alex Hall wrote: Hello all, I am using the configobj package to handle a ridiculously simple ini What's configobj? >>> import configobj Traceback (most recent call last): File "", line 1, in ImportError: N

Re: [Tutor] using configobj package to output quoted strings

2011-06-19 Thread Alan Gauld
"Steven D'Aprano" wrote ...The only good reason to escape a quotation mark is if you need *both* quote marks in a single string: "John Cleese said, \"'e's not dead, 'e's just pining for the fjords!\"" And even here you can use outer triple quotes if you prefer: '''John Cleese said, "'e's

Re: [Tutor] using configobj package to output quoted strings

2011-06-18 Thread Steven D'Aprano
Alex Hall wrote: Still, it is odd (well, to me at least) that when I write the string to the file with no quotes, I get no quotes, but using double quotes in the string's value gives me both single and double quotes. Sounds to me like bad design on the part of configobj, but perhaps I'm misu

Re: [Tutor] using configobj package to output quoted strings

2011-06-18 Thread Alex Hall
On 6/18/11, Steven D'Aprano wrote: > Alex Hall wrote: >> Hello all, >> I am using the configobj package to handle a ridiculously simple ini > > What's configobj? > > >>> import configobj > Traceback (most recent call last): >File "", line 1, in > ImportError: No module named configobj > > It

Re: [Tutor] using configobj package to output quoted strings

2011-06-18 Thread Steven D'Aprano
Alex Hall wrote: Hello all, I am using the configobj package to handle a ridiculously simple ini What's configobj? >>> import configobj Traceback (most recent call last): File "", line 1, in ImportError: No module named configobj It's not in the 3.1 standard library. Is it a third-part pac

[Tutor] using configobj package to output quoted strings

2011-06-18 Thread Alex Hall
Hello all, I am using the configobj package to handle a ridiculously simple ini file, which takes the form: [favorites] "search name" = "search terms", "search type" for any number of searches stored in the favorites section. I need the search type, term, and name to be read in as strings, but the