Advertisement
MD500_Pilot

Untitled

Mar 17th, 2021
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. [notifications]
  2. alert_emails = ['richardjs@gmail.com', 'richard@garden-pi.com']
  3.  
  4.  
  5.  
  6. def read_config_data(file, section, item):
  7. pathname = '/root/plot_manager/' + file
  8. config.read(pathname)
  9. return config.get(section, item)
  10.  
  11. email_address = read_config_data('plot_manager_config', 'notifications', 'alert_emails')
  12. print (email_address)
  13.  
  14. RETURNS:
  15. ['richardjs@gmail.com', 'richard@garden-pi.com']
  16.  
  17.  
  18.  
  19. But then I try this:
  20. email_address = read_config_data('plot_manager_config', 'notifications', 'alert_emails')
  21. for email in email_address:
  22. print (email)
  23.  
  24. IT RETURNS
  25. [
  26. '
  27. r
  28. i
  29. c
  30. h
  31. a
  32. r
  33. d
  34. j
  35. s
  36. @
  37. g
  38. m
  39. a
  40. i
  41. l
  42. .
  43. c
  44. o
  45. m
  46. '
  47. ,
  48.  
  49. '
  50. r
  51. i
  52. c
  53. h
  54. a
  55. r
  56. d
  57. @
  58. g
  59. a
  60. r
  61. d
  62. e
  63. n
  64. -
  65. p
  66. i
  67. .
  68. c
  69. o
  70. m
  71. '
  72. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement