[IPython-dev] Download a Python-generated file over the web through IPython Notebook
takowl at gmail.com
Mon Aug 4 14:22:32 EDT 2014
On 4 August 2014 11:18, Alessandro Gagliardi <
alessandro.gagliardi at glassdoor.com> wrote:
> I’d like to allow users to generate a CSV in a notebook that is hosted
> remotely and download that file to their local machine, perhaps through a
> widget (or some other way that doesn’t require the command line).
> Is this possible? The closest thing I can think of is pandas’
> to_clipboard method which could then be used to paste the data into a local
> spreadsheet, but that seems clumsy and prone to human error.
It's perfectly possible so long as the kernel is running on the same
machine as the notebook server (which is the default configuration). Just
write the file, and then display an HTML link pointing to it using a
to_clipboard won't work, because that sets the clipboard on the machine
where the code is running, not on the user's machine.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev