Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [notifications]
- alert_emails = ['richardjs@gmail.com', 'richard@garden-pi.com']
- def read_config_data(file, section, item):
- pathname = '/root/plot_manager/' + file
- config.read(pathname)
- return config.get(section, item)
- email_address = read_config_data('plot_manager_config', 'notifications', 'alert_emails')
- print (email_address)
- RETURNS:
- ['richardjs@gmail.com', 'richard@garden-pi.com']
- But then I try this:
- email_address = read_config_data('plot_manager_config', 'notifications', 'alert_emails')
- for email in email_address:
- print (email)
- IT RETURNS
- [
- '
- r
- i
- c
- h
- a
- r
- d
- j
- s
- @
- g
- m
- a
- i
- l
- .
- c
- o
- m
- '
- ,
- '
- r
- i
- c
- h
- a
- r
- d
- @
- g
- a
- r
- d
- e
- n
- -
- p
- i
- .
- c
- o
- m
- '
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement