Advertisement
Guest User

Untitled

a guest
May 4th, 2015
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. body = "<span style='font-weight:bold'>Title : </span>{}</br>
  2. <span style='font-weight:bold'>Journal : </span>{}</br></br>
  3. <span style='font-weight:bold'>Abstract : </span></br></br>{}"
  4.  
  5. body = body.format(title, journal, abstract)
  6. url = "mailto:?subject={}&body={}"
  7. url = url.format(title, body)
  8.  
  9. if sys.platform=='win32':
  10. os.startfile(url)
  11.  
  12. elif sys.platform=='darwin':
  13. subprocess.Popen(['open', url])
  14.  
  15. else:
  16. # Create an url to be opened with a mail client
  17. try:
  18. subprocess.Popen(['xdg-email', url])
  19. except OSError:
  20. self.l.error("shareByEmail: OSError")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement