Ticket #4273 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Add an option to use the IPython Qt console as a MantidPlot interpreter terminal

Reported by: Russell Taylor Owned by: Russell Taylor
Priority: critical Milestone: Release 2.0
Component: MantidPlot Keywords:
Cc: martyn.gigg@… Blocked By:
Blocking: Tester: Andrei Savici

Description

We intend to replace the current MantidPlot python 'interpreter' terminal with the IPython qt console (http://ipython.org).

Martyn prototyped a method for getting this to work, which is at https://github.com/martyngigg/embedded_ipython

Change History

comment:1 Changed 9 years ago by Russell Taylor

  • Status changed from new to accepted

comment:2 Changed 9 years ago by Russell Taylor

Fake methods to make IPython import possible in scripting window.

Should be temporary as in this case we wouldn't want the output redirected to the scripting console. Re #4273.

Changeset: 725563cdb72911d405516b16c788354072165a3d

comment:4 Changed 9 years ago by Russell Taylor

Possible issue: matplotlib appears to have some commands that are the same as qtiplot (e.g. plot, table).

comment:5 Changed 9 years ago by Russell Taylor

Add scripts to launch IPython console. Re #4273.

Also add a menu item & shortcut (F5) to start the console. This is only visible if IPython is available.

Changeset: 4c0ce693003635dc94a6011d9b6f879ca82c54a1

comment:6 Changed 9 years ago by Russell Taylor

Quiet messages on failure to import IPython. Re #4273.

Changeset: 36b2034b36c90cb8412ada8c1e2af44433edfead

comment:7 Changed 9 years ago by Russell Taylor

Bring in the Mantid definitions irrespective of the cwd. Re #4273.

Changeset: df0a5f0e74e224d968fb1bcd9bc74350df66b26f

comment:8 Changed 9 years ago by Russell Taylor

Add ipython startup directory to Windows installer. Re #4273.

Haven't got it to work under Windows yet, but I'm fairly confident I will and it doesn't do any harm having it there.

Changeset: 9809cf9b9c1e56141199610cbcae97252057ae81

comment:9 Changed 9 years ago by Russell Taylor

Fix Windows installer generation. Re #4273.

Changeset: c92dc43424576137eba3c64c0f5404da87c9c0a3

comment:10 Changed 9 years ago by Janik Zikovsky

Here are the steps I needed to do to get this to work under Ubuntu 11.04:

comment:11 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 32 to Iteration 33

Moved to iteration 33 at iteration 32 code freeze

comment:12 Changed 9 years ago by Russell Taylor

  • Milestone changed from Iteration 33 to Iteration 32

comment:13 Changed 9 years ago by Russell Taylor

Still need to get this working on Mac (hopefully just need to get/build 64 bit matplotlib) and windows, and then write some instructions. Shouldn't need to make any more modifications to the checked-in code itself.

comment:14 Changed 9 years ago by Russell Taylor

  • Summary changed from Adopt IPython as the MantidPlot interpreter terminal to Add an option to use the IPython Qt console as a MantidPlot interpreter terminal

comment:15 Changed 9 years ago by Russell Taylor

comment:16 Changed 9 years ago by Russell Taylor

Changes to IPython console launching scripts for windows. Re #4273.

The IPython function used to launch the console uses sys.executable, assuming it to be the python executable. For us, it is on Linux/Mac but on Windows that gives the MantidPlot executable. Cue a period of confusion when hitting F5 started another MantidPlot!

Changeset: d79beecb9ea94bfd91ac97b69e16ad8b32e848da

comment:17 Changed 9 years ago by Russell Taylor

Enable console to be relaunched after closing. Re #4273.

Or to have multiple consoles open if desired.

Changeset: ed55cd740a44dffbaf5c27c3bba631ee47780389

comment:18 Changed 9 years ago by Russell Taylor

Fix so console can be relaunched on Windows. Re #4273.

Changeset: e9cb6bd83b838c81e6c7d704723eebe523a98507

comment:19 Changed 9 years ago by Russell Taylor

  • Status changed from accepted to verify
  • Resolution set to fixed

I've now managed to get this working on all platforms. Tester: See the instructions page referenced under comment 14.

comment:20 Changed 9 years ago by Russell Taylor

For possible future work, this is relevant: http://mail.scipy.org/pipermail/ipython-dev/2012-January/008552.html

One of the contributors to the thread is from the SNS, so there may be help available if needed!

See also the links under comment 3.

comment:21 Changed 9 years ago by Andrei Savici

  • Status changed from verify to verifying
  • Tester set to Andrei Savici

comment:22 Changed 9 years ago by Andrei Savici

  • Status changed from verifying to closed

Seems to be working. I was able to Load a file and ExtractX.

comment:23 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5120

Note: See TracTickets for help on using tickets.