Skip to content

Instantly share code, notes, and snippets.

@goish135
Created February 10, 2022 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goish135/08d09c9f6a124d6f9c23aea8e07b5dbb to your computer and use it in GitHub Desktop.
Save goish135/08d09c9f6a124d6f9c23aea8e07b5dbb to your computer and use it in GitHub Desktop.
app.config to paas import excel
# V Read every line in application.config
# V split each line using equal operator
# ---
# write to excel:
# Put key value to excel specified field
# & default value already wriien in excel
# ---
# [Note]
# Check it ...
# Diff env diff value but same key
# File ref in para
# Erb context & mapping (file location)
# # dic name: dic
# dic = {}
with open('/Users/supinyu/Desktop/sample.config') as f:
for line in f:
print(line)
arr=line.rsplit("=")
print("key:"+arr[0]+"\t"+"val:"+arr[1]) # to be remove head tail space or not ?
dic[arr[0]] = arr[1].strip('\n')
print(dic)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment