[IPython-dev] Feasilibity of widgets/layout for mimicking this
hughesadam87 at gmail.com
Wed Aug 20 19:32:35 EDT 2014
GREAT! Thank you
On Wed, Aug 20, 2014 at 7:03 PM, Fernando Perez [via Python] <
ml-node+s6n5068685h97 at n6.nabble.com> wrote:
> On Wed, Aug 20, 2014 at 3:29 PM, Adam Hughes <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=5068685&i=0>> wrote:
>> These widgets would need to accept input data, and return output data.
>> For example in the example Nicholas shared, I'd like the user to be able
>> to pass in a matrix, calculate the synchronous spectra, and then use that
>> for further analysis in subsequent cells in the primary notebook. Having
>> that as a capability would be huge for us, because we envision a mixed
>> API/GUI workflow.
> One option here would be to provide a text field for the user to name the
> variables they want returned for any given output (or you can fix those if
> you want), and then have your kernel-side code store them in the user's
> namespace directly.
> Here's how you can immediately write variables in ipython:
> In : ip = get_ipython()
> In : a = 'hello'
> In : ip.user_ns['a']
> Out: 'hello'
> In : ip.user_ns['a'] = 100
> In : a
> Out: 100
> We can think further about whether other paradigms might be cleaner, but
> I'm not sure that making variables be the return value of the widget itself
> will work all that well. But in the meantime, and until we decide what the
> best solution is in the long term, this will already work and it uses a
> 100% stable IPython api. It may be in the end this *is* a long-term
> solution we all like, but even if not, I think it's pretty serviceable.
> Fernando Perez (@fperez_org; http://fperez.org)
> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)
> fernando.perez-at-berkeley: contact me here for any direct mail
> IPython-dev mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5068685&i=1>
> If you reply to this email, your message will be added to the discussion
> To unsubscribe from Feasilibity of widgets/layout for mimicking this, click
View this message in context: http://python.6.x6.nabble.com/Feasilibity-of-widgets-layout-for-mimicking-this-tp5068197p5068690.html
Sent from the IPython - Development mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev