Skip to content

Instantly share code, notes, and snippets.

@svalordev
Created March 4, 2025 07:43
Show Gist options
  • Save svalordev/78c4db51cf38561f17515eac1764de63 to your computer and use it in GitHub Desktop.
Save svalordev/78c4db51cf38561f17515eac1764de63 to your computer and use it in GitHub Desktop.
DOTDOE
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