Python console support
When using the PyGTK GUI, press 'F12' to access an IPython prompt. This python prompt will allow you to access various scripting functionality in ASCEND. Currently the only object added to the console's namespace is browser which corresponds to the Browser class in the file pygtk/gtkbrowser.py. Using the prompt, try the following:
M = browser.sim M.T_amb float(M.T_amb) M.T_amb.setRealValue(350) browser.modelview.refreshtree() M.T_amb.setRealValueWithUnits(350,"R") browser.modelview.refreshtree()
At present the GUI does not automatically update after each IPython command. We plan to fix this.
The approach used here is derived from a technique described on the IPython wiki. Note that the IPython console supports 'tab completion'... you can press tab any time during the input of a command to see available options.
We plan to improve the usability of the commands possible from the IPython console, hopefully to gradually approach the syntax of the Tcl/Tk 'Script' window.
convert: unable to open file `/srv/ascend/d/up/8/82/Ipython-embed.png' @ error/png.c/ReadPNGImage/3667.
convert: no images defined `/tmp/transform_5189a3d-1.png' @ error/convert.c/ConvertImageCommand/3044.