[IPython-dev] Best approach for uploading files through the Notebook?

Brian Granger ellisonbg at gmail.com
Wed Jun 27 12:34:15 EDT 2012

On Wed, Jun 27, 2012 at 12:06 AM, Matthias BUSSONNIER
<bussonniermatthias at gmail.com> wrote:
>> But saving the file requires a server side handler.  We would have to
>> make changes to both sides to do this.
> If you want to upload on kernel CWD , couldn't you just use the widget <-> kernel API to send data to the kernel that write it to the disk, bypassing the server.
> something like

Yes, you are right that we could do this!  That would be fantastic!
For that call we should use silent=True.

> %upload insert a function `foo_random_string` in current namespace and publish a JS upload widget.
> upload widget have `foo_random_string` as callback to upload data.
> once a file is uploaded `foo_random_string` send a signal to the widget, that changed to `file uploaded` and ask the kernel to del `foo_random_string`

> The other things we might want to do is expose nb-uuidd/cwd/  as current **kernel** working directory.
> --
> Matthias
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu and ellisonbg at gmail.com

More information about the IPython-dev mailing list