Spyder (link) is a popular IDE for working with python.
I personally recommend using jupyter lab instead of spyder because that can also be used for reporting. But if you are new to DAVE and are comfortable with Spyder, then that is a good reason to stick with spyder, at least for a while.
DAVE may work together with spyder if you are lucky. I’m saying may work because both Spyder and DAVE use the Qt library for their graphical user interface. Unfortunately they use different bindings to do so. DAVE used PySide2 while Spyder used PyQt. Reason enough not to work.
On the other hand, on my PC it works, so enjoy it when it works.
My setup (no guarantees):
- go to the command prompt
- activate the DAVE environment: “activate DAVE”
- install spyder using conda: “conda install spyder”
- run spyder in the DAVE environment, either by typing “spyder” at the command prompt or by using the shortcut in your start-menu (if one was created):
Using Spyder and the GUI simultaneously
As from DAVE version 1.3 It is possible to run the Gui from Spyder without blocking the Spyder console.
To set this up, follow the following steps:
- In spyder, disable support for graphics (preferences -> IPython console -> Graphics)
- In your script, enter the IPython magic “%gui qt”. This starts the qt-event loop.
- Start the Gui with block=False as named argument.
for example:
from DAVE import *
%gui qt
from DAVE.gui import *
s = Scene()
Gui(s, block=False)
p = s.new_point('Point2 added from spyder',
position = (3,1,0))
This should open the Gui while keeping Spyder active as well.
From that moment onward both the Gui and Spyder hold a reference to the same Scene object named ‘s’. Both of them can make changes to it, but neither one is notified automatically when the other makes a change. So, because the point is added AFTER the Gui has been opened, the Gui is not yet aware of its existence. For the Gui this can be solved by manually pressing the “Update” button.