Jupyter for Data Science
上QQ阅读APP看书,第一时间看更新

Can you email a notebook?

In order to email your notebook, the notebook must be converted to a plain text format, sent as an attachment to the recipient, and then the recipient must convert it back to the 'binary' notebook format.

Email attachments are normally converted to a well-defined MIME (Multi-purpose Internet Mail Extension) format. There is a program available that converts the notebook format, nb2mail, which converts the notebook to a notebook MIME format. The program is available at https://github.com/nfultz/nb2mail.

Usage is as follows:

  • Install nb2mail using pip command (see website)
  • Convert your selected notebook to MIME format
  • Send to recipient
  • The recipient MIME conversion process will store the file in the correct fashion (assuming they have also installed nb2mail)