473,324 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

[ConfigParser] value with ; and the value blank

kai
Hello,

how can I use/save/read values with ";" (start comment) and the value
blank?
When I write (set) my config file often the part behind the ";"
disappears.
e.g.
myKey = startMyValue ; endMyValue

Thank's for your hints, Kai

May 5 '06 #1
1 1175
kai wrote:
Hello,

how can I use/save/read values with ";" (start comment) and the value
blank?
When I write (set) my config file often the part behind the ";"
disappears.
e.g.
myKey = startMyValue ; endMyValue

Thank's for your hints, Kai

No, but you can write it as:

mykey=startMyValue,endMyValure

or use any other separator (~,:, etc.)

mykey=startMyValue~endMyValue

or you could do something like:

startvalue=startMyValue
endvalue=endMyValue

To do what you ask you would have to write something
custom (not recommended unless you don't control the
format of the file).

-Larry Bates
May 5 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stephen Boulet | last post by:
I'm having a bit of trouble getting my head around the ConfigParser module. I have a very simple configuration file; maybe the easiest thing to do would be to show that: ============ # Add a...
1
by: Robin Munn | last post by:
I've been loving SQLObject. The ability to set up a database connection and then completely *forget* about it and just manipulate Python objects has been great. But I'm running into a problem, and...
11
by: Manlio Perillo | last post by:
Regards. Since sections in CongiParser files are delimited by , why there is not an escape (and unescape) function for escaping &, characters to &, [ and ] ? Thanks ...
2
by: rzed | last post by:
I am working with PythonCard in one of my apps. For its purposes, it uses an .ini file that is passed to ConfigParser. For my app, I also need configuration information, but for various reasons,...
10
by: Terry Carroll | last post by:
It looks like ConfigParser will accept a list to be writing to the *.ini file; but when reading it back in, it treats it as a string. Example: ############################### import...
1
by: kai | last post by:
Hello, I use the ConfigPaserver from Python. how can I use/save/read values with ";" (start comment) and the value blank? When I write (set) my config file often the part behind the ";"...
4
by: Danil Dotsenko | last post by:
Wrote a little "user-friedly" wrapper for ConfigParser for a KDE's SuperKaramba widget. (http://www.kde-look.org/content/show.php?content=32185) I was using 2.4.x python docs as reference and...
1
by: gwillden | last post by:
Hello all, I'd like to propose the following change to ConfigParser.py. I won't call it a bug-fix because I don't know the relevant standards. This change will enable multiline comments as...
4
by: Phoe6 | last post by:
Hi, I have a configfile, in fact, I am providing a configfile in the format: Name: Foo Author: Bar Testcases: tct123
3
by: Phoe6 | last post by:
Hi, Am starting a new thread as I fear the old thread which more than a week old can go unnoticed. Sorry for the multiple mails. I took the approach of Subclassing ConfigParser to support...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.