<div dir="ltr"><div><div><div><div><div><div>Hi Pablo,<br><br></div>> I wonder if it is possible to save the state of these widgets when saving the notebook<br><br></div>Currently, no. We're working on ways to do that, but it turns out to be more complicated than it seems.<br><br>> More specifically, I'd like to use the text editor widget to edit a text file that comes with a notebook<br><br></div>It's possible to do this with widgets, but I don't think it's the best fit for the problem. It sounds like what you want is the %%writefile cell magic. Just make a code cell containing the text you want, with %%writefile filename.txt at the top. When you run it, it will save that content to the file.<br><br></div>We are also planning to put a text editor component inside the notebook server, but that's not quite ready yet.<br><br>> the IPython widgets are becoming one of the very few alternatives for python web-guis<br><br></div>Yes, and this is a much larger scope than the widget architecture was really designed for. We're trying to work out how to handle this.<br><br></div>Thanks,<br>Thomas<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 22 October 2014 07:58, Pablo Winant <span dir="ltr"><<a href="mailto:pablo.winant@gmail.com" target="_blank">pablo.winant@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>The new widgets are absolutely wonderful !</div><div><br></div><div>I wonder if it is possible to save the state of these widgets when saving the notebook. More specifically, I'd like to use the text editor widget to edit a text file that comes with a notebook. That would kill two birds with one stone for me: avoid the need to ship a separate file with the notebook (btw, is there already a canonical way to do that ?), and be able to edit it from within the notebook. Are there plans in this direction ? Any idea about how I could implement that ?</div><div><br></div><div>A somewhat related question: the IPython widgets are becoming one of the very few alternatives for python web-guis. Do you think it would be possible to use it for a relatively simple application and hide the notebook from user's sight so that it looks like an independent application ?</div><div><br></div><div>Best,</div><div><br></div><div>Pablo</div></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>