As I Understand It, the behavior you expect is the expected one - the
contents manager only changes what is available in the notebook
interface, not what's available to the code running inside the
notebook. IMO this exact confusion (what looks like files to you
aren't actually files) is what limits contents manager use outside of
specific circumstances - standard programming language functions for
dealing with files don't work as expected...

To get the behavior you need you should use a linux FUSE setup or
something similar. For Swift, try https://github.com/ovh/svfs? That
operates at a deeper level (Linux Kernel provides FUSE functionality),
and so things like `open` will work as expected (for the most part!)

On Mon, Jul 3, 2017 at 12:31 AM, 'Ian Stuart' via Project Jupyter
<[email protected]> wrote:
> I have subclassed ContentManager, to use a locally provide Cloud
> Infrastructure, however I'm not getting what I would expect as "Expected
> Behaviour" -
>
> I would expect a cell with
> f = open('my_file.txt', w)
> f.write('hello world')
> f.close
> to write to the cloud storage, not local file-store
>
> If the subclass passes all the unit-tests for ContentManager, is this a
> reasonable expectation?
>
> NB:
> The "jupyter_notebook_config.py" is setting the content manager:
> c.NotebookApp.contents_manager_class = 'swiftcontents.SwiftContentsManager'
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/03c22c8b-63e4-4cca-8221-58748083b2e0%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Yuvi Panda T
http://yuvi.in/blog

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAFw%3DySikV9Bx6KxcwXcOgDs1-ii%3DPMTPq5aKgY%2BfYvRS1g_bqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to