I'm using the following code to read a config file:
def get_config():
c = configparser.ConfigParser()
c.read("config.cfg")
return c.options("Server")
The file looks like this:
[Server]
port = 9012
workspace = doc/
But I get the following error:
File "config.cfg", line 3
workspace = doc/
^
SyntaxError: invalid syntax
What's causing this and how can I fix it?