Created
March 4, 2025 07:43
-
-
Save svalordev/78c4db51cf38561f17515eac1764de63 to your computer and use it in GitHub Desktop.
DOTDOE
This file contains hidden or 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 load_dotdoe(doe_path=None): | |
if doe_path is None: | |
f = open('.doe', 'r') | |
else: | |
f = open(doe_path, 'r') | |
text = f.read() | |
lines = text.split('\n') | |
dictionary = {} | |
for line in lines: | |
if line == '': | |
pass | |
else: | |
variable = line.split(' > ')[0] | |
content = line.split(' > ')[1] | |
dictionary[variable] = content | |
f.close() | |
# print(lines) | |
return dictionary |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment