The GUM Tree Calculator (
GTC.exe) can be activated from the Windows Command Prompt, from the Windows PowerShell (in Windows 10) or from the Windows Explorer extended context menu.
The SciTE editor, with context sensitive syntax highlighting and help facilities, is also provided.
- When run without arguments,
GTCenters an interactive mode.
For instance:>>> print copyright Copyright (c) 2017, Callaghan Innovation. All rights reserved. >>> print version 0.9.9 >>> 2**16 + 1 65537
To close the command window, type:quit()
CTRLkey and the
Zkey together) at the command prompt.
GTCcan execute data-processing scripts passed to it on the command-line
For example, a file
msg = 'Hello' print(msg)
can be executed by:
C:\> gtc hello.py Hello
A series of scripts can be passed to
GTCon a single command line, allowing calculations to be chained
After processing scripts,
GTCcan be placed in an interactive mode, allowing further commands to be entered in by hand. The command-line switch
-iselects interactive mode, e.g.:
C:\> gtc -i hello.py Hello >>> print(msg) Hello >>>
Information about a particular
GTC command, or module, can be obtained by typing
help(subject) at the command prompt .
If the help text is too long to fit in the command window,
-- more -- will appear at the bottom.
To display the next line of text, press
ENTER, or to display the next full page of text press the space bar.
To leave the Help facility, type:
The SciTE editor can be activated in two ways:
- There is a link to SciTE in the
- In the Windows Explorer, pressing
SHIFTwhile right-clicking on a file with the
.pyextension activates a context menu with an item
Edit with SciTE (GTC).
SciTE editor will highlight the language syntax. It has a command-completion feature that provides information about commands as they are typed in. The
GTC and Python Help files are also integrated.
SciTE can be used to write and execute scripts:
Gocommand (function key
F5, or menu selection
Tools | Go) executes the current file.
CTRL-3or select the
Tools | Interactive Modemenu item) executes the current file, leaving the interpreter in interactive mode. Commands can then be entered at the
>>>prompt in the SciTE output window.
To close an interactive session in SciTE, type:
CTRL-Zdoes not work in SciTE)
Commands can be typed at the
>>> prompt in the SciTE output window. However,
basic editing features (such as a recalling previous command, command completion, etc)
are not available.
In particular, it is impossible to correct any typing mistakes by pressing the
Doing so erases characters from the display, but it does not remove them from the editor’s buffer.
F1 opens the
GTC help file.
CTRL-4 opens the Python help file.
If a word is selected before pressing either of these help keys, the Help file index is automatically searched for a reference to the word.
|||Under Windows 10, the default font size and family used by the Command Prompt has been changed from earlier Windows versions. We prefer to modify these default settings to size 16 Courier New. To do this: right-click on the GTC shortcut in the GTC item of the Windows Start menu; select properties; select the font tab; change the font family and size; save these settings. Note too that under the layout tab it is possible to change the window size.|
|||When Help is displayed in the Command Prompt, some embedded formatting (mark-up) is visible. For example, |