Created
February 12, 2019 21:00
-
-
Save rusnino/7586aee50ee05e6529e8cf87be90e676 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generate_config_dict(filename): | |
''' | |
''' | |
config_dict = {} | |
with open(filename, 'r') as f: | |
for line in f: | |
if not line.startswith('!') and not ignore_command(line, ignore) and not line.startswith(' '): | |
keyword = line.rstrip() | |
elif not line.startswith('!') and not ignore_command(line, ignore): | |
config_dict[keyword].append(line.rstrip()) | |
return(config_dict) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment