On 04/04/2015 02:42 PM, Kuba Raczkowski wrote:
Hi,
I'm busy writing app base code for interactive lab measurements. The
idea from usability side is like following:
- user generally writes his code in Spyder, it's the most convenient
place for most of my users
Makes sense.
- user starts the measurement application, which pops up as a Qt
application.
- user gets an Ipython console inside Spyder, which has access to
'business' logic of the Qt application. Qt application also has access
to the same objects (like measurement equipment etc.)
So what language is the Qt logic run in?
- thanks to the fact Ipython console is embedded in Spyder, user can run
"F9/F5" to execute some lines or a full script in that console
Not sure that works with anything but Python.
- user is able to open a Qt Ipython console and type there (for the ones
who like it better, but also for inline graphics, drag-n-droping
files/filenames etc.
Is this not redundant as the Spyder IPython console is Qt? Aah, I read
further, you want this in the Qt application.
- finally, user is able to connect to the ipython console from another
machine (implicit ZMQ-enabled IPython kernel..)
When I start IPython in Spyder it does this, if I am following correctly:
To connect another client to this kernel, use:
--existing kernel-6559.json
I know this is combining 3(or 4) ways of communicating with the
application, but in a lab it kind of makes sense:
1. you get an easy to use GUI which you can easily manipulate for
experimentation (oh, wait, let's set this voltage to 1.7V (click, click)
and see what happens)
2. you get access to a script mode so you can run code in an organized
way (that's the IPython console inside spyder)
3. you get ipython qt console, which sometimes is more handy (e.g. if
you start the application as 'standalone')
4. you can leave the lab, but still get control over the measurement
setup via network.
The notion that someone can remotely hack code on instruments in a lab
would give me nightmares.
Does someone have an idea how to implement all of that? Some ideas I had:
- inprocess kernel of IPython - gives qtconsole inside of qt app, but no
networking, no 'terminal ipython', no integration with Spyder
- the idea
from
https://github.com/ipython/ipython/blob/master/examples/Embedding/ipkernel_qtapp.py
- the right direction I think, but how to integrate it with Spyder (to
get a functional 'terminal IPython'? Also, there seems to be some bug
there which hangs the app at tab completion - but that's something for
Ipython people
Thanks !
Kuba
--
--
Adrian Klaver
[email protected]
--
You received this message because you are subscribed to the Google Groups
"spyder" 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].
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.