On Jan 8, 1:01 pm, Andy Somogyi <andy.somo...@gmail.com> wrote: > Thats sort of what I was originally thinking for a first go, but I'm not sure > how > useful it would be in the long term. What would be pretty quick is to create > an app, main view > would be a text editor, say use the editor component from smultron, and > extend it so you could have > mplotlib widgets (mplotlib, with a pdf backend) in the editor. > > This approach would be a lot quicker than adding a python empowered DOM to > webkit, but would not give > anywhere near the functionality, and much of the code would be Mac specific > (no problem for me, but > not everyone is a Mac user). > > 3D plots could be handled with google's O3D. Even though O3D is intended as a > WebKit plugin, the way it > creates language bindings is a bit different (and a lot cleaner) then webkit: > O3D has set of idl files > that are processed by a set of python scripts to generate language bindings. > These scripts are very > different then the perl scripts for webkit, and a lot easier to hack. So, its > possible to create a > python enabled O3D component, and also host this in the editor view. > > With either route, all the graph drawing code would be python, and would not > matter much if the > O3D canvas is hosted in WebKit, or an editor view.
One approach to a desktop application which might be "relatively" simple and cross-platform is to use the Qt stuff. In particular, using QtWebKit as a component in a window will give you, pretty much, a full browser which you can get at with C++ code. With the right twiddling, you could use PyQt to grab matplotlib graphics for display. QtWebKit should support JMol and for hard core 3D I would just go full out and nail up Mayavi2. Having the notebook in a window gives you the full notebook editing for free while you build up whatever other editing might be better for a native app. The tricky bit, as usual, is the event loop. Ideally, the application would have access to all the data in a single process. It could support the web stuff and whatever display code which works best native. Building a 3D capability across the wire to replace JMol would be work. I think Mayavi2 is a really significant capability which works great with sage currently and might be a better approach than O3D but I'm not really familiar with that capability. What I currently do, and its a bit of a kludge, is run ipython with the -q4thread event loop. I have C++ Qt windows for my custom gui requirements (invoked through some Cython bridge code), matplotlib through PyQt and Mayavi2. I don't currently use the notebook in those processes because of my use case but twisted is already built into ipython for their parallel computing capability. I've had trouble figuring it out and its sort of a work in progress but the essential capabilities are there. Either way, Qt is a great base because of its web components and its cross-platform architecture. While there are some tricky bits to consider, I think they're "relatively" straightforward and the underlying event loop issue may be easier now with the notebook rewrite activity. > > On Jan 8, 2010, at 2:56 PM, kcrisman wrote: > > > > > > >>> to Mathematica, and Sage, combined with a native front end would be > >>> the trick. > > >> I think you should try. If you can do it, and it works well, and is > >> maintainable, then we all win. If the project doesn't work out, > >> what's the worst than can happen? You will learn a lot anyways, and > >> somebody else can pick up your code later. So go for it! > > > An interesting more tractable (not for me, sadly) first step would be > > to use Interface Builder (on Mac) to embed the Terminal and notebook > > more "natively", and/or create a native front end beyond the current > > app bundle. This has been done for other programs, for instance there > > is (was?) one for Macaulay 2. Though of course it wouldn't > > necessarily lead to any usable code for the larger project - just a > > thought. > > > - kcrisman > > -- > > To post to this group, send an email to sage-devel@googlegroups.com > > To unsubscribe from this group, send an email to > > sage-devel+unsubscr...@googlegroups.com > > For more options, visit this group > > athttp://groups.google.com/group/sage-devel > > URL:http://www.sagemath.org
-- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org