擅长:python、mysql、java
<p>试试这个。你知道吗</p>
<pre><code>import configparser
config = configparser.RawConfigParser()
try:
with open(YourConfigFilePath) as f:
config.readfp(f)
except:
print("Config file Don't exist.")
# Check the config variable
print(config)
</code></pre>