I have a variable in a python file that contains a string. When I reference this variable in the same file all goes well, though if the values are stored in an .ini file instead, and referenced via ConfigParser.ConfigParser() et al, the string comes back with double quotes around it. It is still of the data type str, though they are no longer the same.
As an example.
firstName = "Eli"
print(firstName) # Eli
myParser = ConfigParser.ConfigParser()
myParser.read("config.ini")
myFirstName = myParser.get("Names","firstName")
print(myFirstName) # "Eli"
the comments above show what the output would be. I'd like to be able to get the latter approach (from the .ini file) to either return the string sans double quotes, or a way to get them out (replace doesn't work). My guess is that it has something to do with encoding, though I cannot seem to figure it out.
Thanks in advance.
Here's what my config.ini file looks like
[Names]
firstName = "Eli"
...
config.ini?myParser.get("Names","firstName").strip('"')