Not sure if the right place to ask about jupyter, but trying to work out if there's a sensible way to get the URL of the current notebook for use in a display widget. If you make an IFrame object you need to set src=... which works fine if you're just using files in the cwd.
actually I'm not even sure that's the right question, what I'm really looking for is a tmpdir where I can write files which can be served via notebooks in an IFrame. The notebook ipynb files are in a shared directory, so I can't have people write to that directory directly.
Thanks @michaelaye, really helpful, but it still seems to validate what I was asking or maybe I didn't frame the question well enough,and your answer gave a detailed way of implementation, it's a reference now ☺