Python console support

Jump to: navigation, search
This page documents an experimental feature. Please tell us if you experience any problems.

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/ Using the prompt, try the following:

To see what is broadly possible under Python at present, take a look at and the .py and .h files in the pygtk directory of the source code.

M = browser.sim

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.

Error creating thumbnail: File missing
Screenshot of a short IPython session within ASCEND.

See also Plotting in ASCEND (the console can be used for customized plots in conjunction with Observer tabs).